Uploaded image for project: 'camunda BPM'
  1. camunda BPM
  2. CAM-11281

Integrate Testcontainers into the Process Engine testsuite

    • Icon: Task Task
    • Resolution: Done
    • Icon: L3 - Default L3 - Default
    • 7.16.0, 7.16.0-alpha5
    • None
    • engine
    • None

      1. Use a single container per run
        1. Confirm that it works in Eclipse, CMD, IntelliJ
      2. Use in more tests:
        1. Use in JUnit3 + JUnit4
          1. For JUnit3 - extend base class into test code and integrate TC there
        2. Use in DB rolling update and migration tests
      3. Use a remote Docker daemon (portainer)
        1. Test in a simulated env before actual modificaitons
      4. Support multiple versions of a database type (e.g. Oracle 11/12/18/19)

       

      Out of scope:

      1. Use multiple containers per test
      2. Use TC in QA runtimes

        This is the controller panel for Smart Panels app

            [CAM-11281] Integrate Testcontainers into the Process Engine testsuite

            Nikola Koevski added a comment - - edited

            Status update:

            • Support multiple versions of a database type - FINISHED
            • Use in JUnit 3 + JUnit 4
              • Porting of JUnit 3 base classes (PluggableProcessEngineTestCase, ResourceProcessEngineTestCase, CmmnProcessEngineTestCase) is FINISHED (and works in most cases). All the JUnit3 tests now use a single Test class (PluggableProcessEngineTest).
              • When a Process Engine is built directly in the test from a configuration file, the tests were failing since Testcontainers wasn't hooking into the build process. I have created a ProcessEngineProvider wrapper class to substitute the ProcessEngineConfiguration#createProcessEngineConfigurationFromResource method call and enable Testcontainers to be hook into the build process.
              • The ProcessEnginesTest looks for camunda.cfg.xml files directly on the classpath. I worked around this by providing a TestClassloader that limits the classpath access to a given package. I also restricted the test to the H2 database since it's testing a functionality independent of the database type.
              • Currently, there are no test failures when running individual test packages, but there are still some when running the complete test suite. I plan to try the following approach:
                1. Migrate all the tests to JUnit4
                2. Debug the failing tests.
            • I also need to confirm that the TC integration works on Eclips. The plan is to set up Eclipse myself and test it there.
            • To test operation with a remote Docker environment, I plan to use a Raspberry Pi and configure the Docker daemon to accept remote connections. This will provide an idea on how it can be done.

            Nikola Koevski added a comment - - edited Status update: Support multiple versions of a database type - FINISHED Use in JUnit 3 + JUnit 4 Porting of JUnit 3 base classes (PluggableProcessEngineTestCase, ResourceProcessEngineTestCase, CmmnProcessEngineTestCase) is FINISHED (and works in most cases). All the JUnit3 tests now use a single Test class (PluggableProcessEngineTest). When a Process Engine is built directly in the test from a configuration file, the tests were failing since Testcontainers wasn't hooking into the build process. I have created a ProcessEngineProvider wrapper class to substitute the ProcessEngineConfiguration#createProcessEngineConfigurationFromResource method call and enable Testcontainers to be hook into the build process. The ProcessEnginesTest looks for camunda.cfg.xml files directly on the classpath. I worked around this by providing a TestClassloader that limits the classpath access to a given package. I also restricted the test to the H2 database since it's testing a functionality independent of the database type. Currently, there are no test failures when running individual test packages, but there are still some when running the complete test suite. I plan to try the following approach: Migrate all the tests to JUnit4 Debug the failing tests. I also need to confirm that the TC integration works on Eclips. The plan is to set up Eclipse myself and test it there. To test operation with a remote Docker environment, I plan to use a Raspberry Pi and configure the Docker daemon to accept remote connections. This will provide an idea on how it can be done.

              nikola.koevski Nikola Koevski
              nikola.koevski Nikola Koevski
              Nikola Koevski Nikola Koevski
              Tassilo Weidner Tassilo Weidner
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: