From bafcf9131706ca3c7b6182563b773727a09496c7 Mon Sep 17 00:00:00 2001 From: Simon Zambrovski Date: Mon, 9 Oct 2023 14:16:36 +0200 Subject: [PATCH 1/5] switch to new correct location, fix #381 --- extension/junit5-platform-7/pom.xml | 11 ++++++----- .../platform7/ProcessEngineCoverageExtension.kt | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/extension/junit5-platform-7/pom.xml b/extension/junit5-platform-7/pom.xml index 8cf34ef2..11f2cebb 100644 --- a/extension/junit5-platform-7/pom.xml +++ b/extension/junit5-platform-7/pom.xml @@ -1,9 +1,6 @@ 4.0.0 - - 1.1.0 - camunda-process-test-coverage-parent org.camunda.community.process_test_coverage @@ -12,11 +9,15 @@ Camunda Process Test Coverage JUnit5 Platform 7 camunda-process-test-coverage-junit5-platform-7 + + 7.20.0 + + + Therefor the tests are in a separate module. --> org.camunda.bpm camunda-engine @@ -49,7 +50,7 @@ junit-jupiter - org.camunda.bpm.extension + org.camunda.bpm camunda-bpm-junit5 ${camunda-bpm-junit5.version} diff --git a/extension/junit5-platform-7/src/main/kotlin/org/camunda/community/process_test_coverage/junit5/platform7/ProcessEngineCoverageExtension.kt b/extension/junit5-platform-7/src/main/kotlin/org/camunda/community/process_test_coverage/junit5/platform7/ProcessEngineCoverageExtension.kt index 4fe45eba..e0e95f26 100644 --- a/extension/junit5-platform-7/src/main/kotlin/org/camunda/community/process_test_coverage/junit5/platform7/ProcessEngineCoverageExtension.kt +++ b/extension/junit5-platform-7/src/main/kotlin/org/camunda/community/process_test_coverage/junit5/platform7/ProcessEngineCoverageExtension.kt @@ -5,7 +5,7 @@ import org.assertj.core.api.Assertions import org.assertj.core.api.Condition import org.camunda.bpm.engine.ProcessEngineConfiguration import org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl -import org.camunda.bpm.extension.junit5.test.ProcessEngineExtension +import org.camunda.bpm.engine.test.junit5.ProcessEngineExtension import org.camunda.community.process_test_coverage.core.model.DefaultCollector import org.camunda.community.process_test_coverage.core.model.Run import org.camunda.community.process_test_coverage.core.model.Suite From d67bc0c033656ff7ada6749076a43b623548e9eb Mon Sep 17 00:00:00 2001 From: Simon Zambrovski Date: Mon, 9 Oct 2023 15:11:04 +0200 Subject: [PATCH 2/5] switch minimum version to 7.16 --- .github/workflows/compatibility.yml | 17 ++++------------- pom.xml | 4 ++-- 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/.github/workflows/compatibility.yml b/.github/workflows/compatibility.yml index edbae503..e979c8c5 100644 --- a/.github/workflows/compatibility.yml +++ b/.github/workflows/compatibility.yml @@ -12,7 +12,7 @@ jobs: strategy: fail-fast: false # Build for three operating systems, currently JVMs 11, 17 and latest four Camunda versions (last two years) - # We run Legacy support test on Ubuntu, JDK 1.8 until 7.10 (Release end of 2018). + # We run Legacy support test on Ubuntu, JDK 1.8 until 7.16 (Release end of 2021). matrix: os: - 'ubuntu-latest' @@ -20,11 +20,11 @@ jobs: - 'macos-latest' jdk: - '11' - - '17' # no official support yet by Camunda + - '17' camunda-version: - - '7.20' + - '7.20' # 2023 - '7.19' # 2023 - - '7.18' + - '7.18' # 2022 - '7.17' # 2022 - '7.16' # 2021 exclude: @@ -40,15 +40,6 @@ jobs: - os: 'ubuntu-latest' jdk: '8' # Checking legacy JDK 8 support with old Camunda versions camunda-version: '7.16' # 2021 - - os: 'ubuntu-latest' - jdk: '8' # Checking legacy JDK 8 support with old Camunda versions - camunda-version: '7.15' # 2021 - - os: 'ubuntu-latest' - jdk: '8' # Checking legacy JDK 8 support with old Camunda versions - camunda-version: '7.14' # 2020 - - os: 'ubuntu-latest' - jdk: '8' # Checking legacy JDK 8 support with old Camunda versions - camunda-version: '7.13' runs-on: ${{ matrix.os }} steps: diff --git a/pom.xml b/pom.xml index ae94c749..0b9c8a17 100644 --- a/pom.xml +++ b/pom.xml @@ -32,12 +32,12 @@ 3.0.0 - 7.14.0 + 7.16.0 8.2.13 8.2.4 2.6.7 From ec163f35585f00de04730e0d4337cbfd6f43186e Mon Sep 17 00:00:00 2001 From: Jan Rohwer Date: Tue, 10 Oct 2023 11:14:10 +0200 Subject: [PATCH 3/5] chore: clean up POM files and dependencies --- .github/workflows/compatibility.yml | 6 +-- docs/developer-guide/project-setup.md | 37 +++++-------------- docs/user-guide/configuration.md | 1 - examples/jgiven-platform-7/pom.xml | 13 +------ examples/junit4-platform-7/pom.xml | 2 +- examples/junit5-platform-7/pom.xml | 8 +++- examples/pom.xml | 23 ++---------- examples/spring-starter-platform-7/pom.xml | 11 ------ examples/spring-test-platform-7/pom.xml | 8 +--- examples/spring-test-platform-8/pom.xml | 4 +- extension/junit5-platform-7/pom.xml | 15 +++----- extension/spring-test-platform-8/pom.xml | 8 ++-- pom.xml | 14 +++---- regression-tests/junit4-platform-7/pom.xml | 14 ------- .../BpmnBusinessRuleTaskCoverageTest.java | 4 -- regression-tests/junit5-platform-7/pom.xml | 10 ++--- regression-tests/pom.xml | 28 +------------- 17 files changed, 50 insertions(+), 156 deletions(-) diff --git a/.github/workflows/compatibility.yml b/.github/workflows/compatibility.yml index e979c8c5..8ad3da4c 100644 --- a/.github/workflows/compatibility.yml +++ b/.github/workflows/compatibility.yml @@ -12,7 +12,7 @@ jobs: strategy: fail-fast: false # Build for three operating systems, currently JVMs 11, 17 and latest four Camunda versions (last two years) - # We run Legacy support test on Ubuntu, JDK 1.8 until 7.16 (Release end of 2021). + # We run Legacy support test on Ubuntu, JDK 1.8 until 7.17 (Release 2022). matrix: os: - 'ubuntu-latest' @@ -26,7 +26,6 @@ jobs: - '7.19' # 2023 - '7.18' # 2022 - '7.17' # 2022 - - '7.16' # 2021 exclude: - jdk: '11' camunda-version: '7.20' @@ -37,9 +36,6 @@ jobs: - os: 'ubuntu-latest' jdk: '8' # Checking legacy JDK 8 support with old Camunda versions camunda-version: '7.17' # 2022 - - os: 'ubuntu-latest' - jdk: '8' # Checking legacy JDK 8 support with old Camunda versions - camunda-version: '7.16' # 2021 runs-on: ${{ matrix.os }} steps: diff --git a/docs/developer-guide/project-setup.md b/docs/developer-guide/project-setup.md index f5fd385f..3aaaeaa3 100644 --- a/docs/developer-guide/project-setup.md +++ b/docs/developer-guide/project-setup.md @@ -5,11 +5,11 @@ If you are interested in developing and building the project please read the fol To get sources of the project, please execute: ```sh -git clone https://github.com/camunda-communit-hub/camunda-rest-client-spring-boot.git -cd camunda-rest-client-spring-boot +git clone https://github.com/camunda-community-hub/camunda-process-test-coverage.git +cd camunda-process-test-coverage ``` -We are using gitflow in our git SCM for naming b## Support Matrixranches. That means that you should start from `develop` branch, +We are using gitflow in our git SCM for naming branches. That means that you should start from `develop` branch, create a `feature/` out of it and once it is completed create a pull request containing it. Please squash your commits before submitting and use semantic commit messages, if possible. @@ -21,24 +21,21 @@ Perform the following steps to get a development setup up and running. ./mvnw clean install ``` -## Integration Tests +## Regression Tests -By default, the build command will ignore the run of `failsafe` Maven plugin executing the integration tests -(usual JUnit tests with class names ending with ITest). In order to run integration tests, please +By default, the build command will ignore the run of the regression tests. In order to run the regression tests, please call from your command line: ```sh -./mvnw -Pitest +./mvnw -Pregression-test ``` ## Project build modes and profiles ### Camunda Version -You can choose the used Camunda version by specifying the profile `camunda-ee` or `camunda-ce`. The default -version is a Community Edition. Specify `-Pcamunda-ee` to switch to Camunda Enterprise edition. This will -require a valid Camunda license. You can put it into a file `~/.camunda/license.txt` and it will be detected -automatically. +The library is compiled against an older version of Camunda (see camunda.compile.version property in parent POM). +To select a Camunda version for the tests you can start with a designated profile e.g. camunda-bpm-engine-7.18. ### Documentation @@ -59,21 +56,6 @@ By default, the sources and javadoc API documentation are not generated from the ./mvnw clean install -Prelease -Dgpg.skip=true ``` -#### Starting example applications - -To start applications, either use your IDE and create -run configuration for the class: - -* `org.camunda.bpm.extension.rest.example.standalone.CamundaRestClientExampleApplication` -* `org.camunda.bpm.extension.rest.example.processapplication.CamundaRestClientExampleApplicationWithEngineProvided` - -Alternatively, you can run them from the command line: - -```sh -./mvn spring-boot:run -f examples/example -./mvn spring-boot:run -f examples/example-provided -``` - ### Continuous Integration Github Actions are building all branches on commit hook (for codecov). @@ -91,4 +73,5 @@ Every Maven module is enabled by default. If you want to change this, please pro true ``` -inside the corresponding `pom.xml`. Currently, all `examples` are _EXCLUDED_ from publication into Maven Central. +inside the corresponding `pom.xml`. Currently, all `examples` are _EXCLUDED_ from publication into Maven Central.` +` \ No newline at end of file diff --git a/docs/user-guide/configuration.md b/docs/user-guide/configuration.md index a47927ae..5aafa79e 100644 --- a/docs/user-guide/configuration.md +++ b/docs/user-guide/configuration.md @@ -7,7 +7,6 @@ Optionally, you might configure output path for reports. By default the reports org.apache.maven.plugins maven-surefire-plugin -2.22.2 ${project.build.directory}/my-coverage-reports/ diff --git a/examples/jgiven-platform-7/pom.xml b/examples/jgiven-platform-7/pom.xml index 07d863c0..c5eb80bb 100644 --- a/examples/jgiven-platform-7/pom.xml +++ b/examples/jgiven-platform-7/pom.xml @@ -12,6 +12,7 @@ 1.3.0 + 0.4.1 @@ -44,26 +45,16 @@ org.camunda.bpm.springboot camunda-bpm-spring-boot-starter-test test - - - org.camunda.bpm.assert - camunda-bpm-assert-assertj3-11-1 - - org.springframework.boot spring-boot-starter-jdbc test - - org.camunda.bpm.assert - camunda-bpm-assert - test - io.holunda.testing camunda-bpm-jgiven + ${camunda-bpm-jgiven.version} test diff --git a/examples/junit4-platform-7/pom.xml b/examples/junit4-platform-7/pom.xml index 72be0bf7..461dec5c 100644 --- a/examples/junit4-platform-7/pom.xml +++ b/examples/junit4-platform-7/pom.xml @@ -26,7 +26,7 @@ - org.camunda.bpm.assert + org.camunda.bpm camunda-bpm-assert test diff --git a/examples/junit5-platform-7/pom.xml b/examples/junit5-platform-7/pom.xml index 7380fcf5..06a3e9d9 100644 --- a/examples/junit5-platform-7/pom.xml +++ b/examples/junit5-platform-7/pom.xml @@ -24,12 +24,18 @@ camunda-engine-spring + - org.camunda.bpm.assert + org.camunda.bpm camunda-bpm-assert test + + org.camunda.bpm + camunda-bpm-junit5 + test + org.assertj diff --git a/examples/pom.xml b/examples/pom.xml index 3c75764a..c61ed7aa 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -13,12 +13,7 @@ pom - 7.16.0 - 8.2.13 - 8.2.4 - 15.0.0 - 0.4.1 - 2.6.7 + ${camunda.compile.version} true true true @@ -41,7 +36,7 @@ org.springframework.boot spring-boot-dependencies - ${springboot.version} + ${spring-boot.version} import pom @@ -54,12 +49,6 @@ import pom - - org.camunda.bpm.assert - camunda-bpm-assert - ${camunda-bpm-assert.version} - test - @@ -70,12 +59,6 @@ pom - - io.holunda.testing - camunda-bpm-jgiven - ${camunda-bpm-jgiven.version} - test - @@ -121,7 +104,7 @@ - java11 + jdk11 [11,) diff --git a/examples/spring-starter-platform-7/pom.xml b/examples/spring-starter-platform-7/pom.xml index a6cd7bdf..2b50c945 100644 --- a/examples/spring-starter-platform-7/pom.xml +++ b/examples/spring-starter-platform-7/pom.xml @@ -35,23 +35,12 @@ org.camunda.bpm.springboot camunda-bpm-spring-boot-starter-test test - - - org.camunda.bpm.assert - camunda-bpm-assert-assertj3-11-1 - - org.springframework.boot spring-boot-starter-jdbc test - - org.camunda.bpm.assert - camunda-bpm-assert - test - org.assertj diff --git a/examples/spring-test-platform-7/pom.xml b/examples/spring-test-platform-7/pom.xml index 12ad2f78..99f0952e 100644 --- a/examples/spring-test-platform-7/pom.xml +++ b/examples/spring-test-platform-7/pom.xml @@ -35,12 +35,6 @@ org.camunda.bpm.springboot camunda-bpm-spring-boot-starter-test test - - - org.camunda.bpm.assert - camunda-bpm-assert-assertj3-11-1 - - org.springframework.boot @@ -48,7 +42,7 @@ test - org.camunda.bpm.assert + org.camunda.bpm camunda-bpm-assert test diff --git a/examples/spring-test-platform-8/pom.xml b/examples/spring-test-platform-8/pom.xml index 8faacaae..c6e9b580 100644 --- a/examples/spring-test-platform-8/pom.xml +++ b/examples/spring-test-platform-8/pom.xml @@ -25,8 +25,8 @@ - io.camunda - spring-zeebe-test-testcontainer + io.camunda.spring + spring-boot-starter-camunda-test-testcontainer ${spring-zeebe.version} test diff --git a/extension/junit5-platform-7/pom.xml b/extension/junit5-platform-7/pom.xml index 11f2cebb..ec11d550 100644 --- a/extension/junit5-platform-7/pom.xml +++ b/extension/junit5-platform-7/pom.xml @@ -9,11 +9,6 @@ Camunda Process Test Coverage JUnit5 Platform 7 camunda-process-test-coverage-junit5-platform-7 - - 7.20.0 - - - - 7.16.0 - 8.2.13 + 7.17.0 + 8.2.8 8.2.4 - 2.6.7 + 2.7.16 @@ -103,6 +100,9 @@ 3.6.0 + + 1.8 + diff --git a/regression-tests/junit4-platform-7/pom.xml b/regression-tests/junit4-platform-7/pom.xml index 841ff14c..b0d1150a 100644 --- a/regression-tests/junit4-platform-7/pom.xml +++ b/regression-tests/junit4-platform-7/pom.xml @@ -63,11 +63,6 @@ spring-orm test - - javax.annotation - javax.annotation-api - test - @@ -89,15 +84,6 @@ test - - \ No newline at end of file diff --git a/regression-tests/junit4-platform-7/src/test/java/org/camunda/community/process_test_coverage/tests/junit4/platform7/bpmn/BpmnBusinessRuleTaskCoverageTest.java b/regression-tests/junit4-platform-7/src/test/java/org/camunda/community/process_test_coverage/tests/junit4/platform7/bpmn/BpmnBusinessRuleTaskCoverageTest.java index f2ad0bc5..d4e56add 100644 --- a/regression-tests/junit4-platform-7/src/test/java/org/camunda/community/process_test_coverage/tests/junit4/platform7/bpmn/BpmnBusinessRuleTaskCoverageTest.java +++ b/regression-tests/junit4-platform-7/src/test/java/org/camunda/community/process_test_coverage/tests/junit4/platform7/bpmn/BpmnBusinessRuleTaskCoverageTest.java @@ -11,10 +11,6 @@ import java.util.Map; public class BpmnBusinessRuleTaskCoverageTest { - /** - * XXXX <camunda> namespace support works from Camunda Platform 7 versions - * 7.4.0, 7.3.3, 7.2.6 onwards. - */ private static final String PROCESS_DEFINITION_KEY = "process-business-rule-task"; diff --git a/regression-tests/junit5-platform-7/pom.xml b/regression-tests/junit5-platform-7/pom.xml index e639dff3..c066b7a1 100644 --- a/regression-tests/junit5-platform-7/pom.xml +++ b/regression-tests/junit5-platform-7/pom.xml @@ -40,6 +40,11 @@ camunda-engine-spring test + + org.camunda.bpm + camunda-bpm-junit5 + test + org.springframework spring-beans @@ -65,11 +70,6 @@ spring-orm test - - javax.annotation - javax.annotation-api - test - diff --git a/regression-tests/pom.xml b/regression-tests/pom.xml index adc6940d..d79ede80 100644 --- a/regression-tests/pom.xml +++ b/regression-tests/pom.xml @@ -86,36 +86,12 @@ 7.17.0 - - camunda-bpm-engine-7.16 - - 7.16.0 - - - - camunda-bpm-engine-7.15 - - 7.15.0 - - - - camunda-bpm-engine-7.14 - - 7.14.0 - - - - camunda-bpm-engine-7.13 - - 7.13.0 - - - jdk11 + jdk12 - [11, + [12, From 0560b127669ff08098b18ecd77df5ed9d719122e Mon Sep 17 00:00:00 2001 From: Jan Rohwer Date: Tue, 10 Oct 2023 11:41:21 +0200 Subject: [PATCH 4/5] chore: test class and method have to be public --- .../junit5/platform7/IntermediateLinkThrowEventTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/junit5-platform-7/src/test/java/org/camunda/community/process_test_coverage/examples/junit5/platform7/IntermediateLinkThrowEventTest.java b/examples/junit5-platform-7/src/test/java/org/camunda/community/process_test_coverage/examples/junit5/platform7/IntermediateLinkThrowEventTest.java index 7adbe98e..2ded21ec 100644 --- a/examples/junit5-platform-7/src/test/java/org/camunda/community/process_test_coverage/examples/junit5/platform7/IntermediateLinkThrowEventTest.java +++ b/examples/junit5-platform-7/src/test/java/org/camunda/community/process_test_coverage/examples/junit5/platform7/IntermediateLinkThrowEventTest.java @@ -9,13 +9,13 @@ import static org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareTests.assertThat; @Deployment(resources = {"intermediate-link-throw-event.bpmn"}) -class IntermediateLinkThrowEventTest { +public class IntermediateLinkThrowEventTest { @RegisterExtension - static ProcessEngineCoverageExtension extension = ProcessEngineExtensionProvider.extension; + public static ProcessEngineCoverageExtension extension = ProcessEngineExtensionProvider.extension; @Test - void should_have_100_percent_coverage_with_intermediate_link_throw_event() { + public void should_have_100_percent_coverage_with_intermediate_link_throw_event() { ProcessInstance processInstance = extension.getProcessEngine().getRuntimeService().startProcessInstanceByKey("Testprocess"); assertThat(processInstance).isEnded(); } From 695f12978a88e7f71b50748860014f8a7cef54da Mon Sep 17 00:00:00 2001 From: Jan Rohwer Date: Tue, 10 Oct 2023 12:26:13 +0200 Subject: [PATCH 5/5] chore: javax.annotation needed for JUnit4 --- regression-tests/junit4-platform-7/pom.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/regression-tests/junit4-platform-7/pom.xml b/regression-tests/junit4-platform-7/pom.xml index b0d1150a..9db72003 100644 --- a/regression-tests/junit4-platform-7/pom.xml +++ b/regression-tests/junit4-platform-7/pom.xml @@ -63,6 +63,11 @@ spring-orm test + + javax.annotation + javax.annotation-api + test +