Skip to content

Commit

Permalink
Merge pull request #382 from camunda-community-hub/feature/381_switch…
Browse files Browse the repository at this point in the history
…_to_correct_junit5

switch to new correct location of camunda-bpm-junit5
  • Loading branch information
rohwerj committed Oct 10, 2023
2 parents 9e9f3a8 + 695f129 commit 423e705
Show file tree
Hide file tree
Showing 19 changed files with 58 additions and 167 deletions.
21 changes: 4 additions & 17 deletions .github/workflows/compatibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,20 @@ 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.17 (Release 2022).
matrix:
os:
- 'ubuntu-latest'
- 'windows-latest'
- '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:
- jdk: '11'
camunda-version: '7.20'
Expand All @@ -37,18 +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
- 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:
Expand Down
37 changes: 10 additions & 27 deletions docs/developer-guide/project-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/<name>` 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.

Expand All @@ -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

Expand All @@ -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).
Expand All @@ -91,4 +73,5 @@ Every Maven module is enabled by default. If you want to change this, please pro
<maven.deploy.skip>true</maven.deploy.skip>
```

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.`
`
1 change: 0 additions & 1 deletion docs/user-guide/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ Optionally, you might configure output path for reports. By default the reports
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.2</version>
<configuration>
<systemPropertyVariables>
<camunda-process-test-coverage.target-dir-root>${project.build.directory}/my-coverage-reports/</camunda-process-test-coverage.target-dir-root>
Expand Down
13 changes: 2 additions & 11 deletions examples/jgiven-platform-7/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

<properties>
<jgiven.version>1.3.0</jgiven.version>
<camunda-bpm-jgiven.version>0.4.1</camunda-bpm-jgiven.version>
</properties>

<dependencies>
Expand Down Expand Up @@ -44,26 +45,16 @@
<groupId>org.camunda.bpm.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.camunda.bpm.assert</groupId>
<artifactId>camunda-bpm-assert-assertj3-11-1</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.camunda.bpm.assert</groupId>
<artifactId>camunda-bpm-assert</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.holunda.testing</groupId>
<artifactId>camunda-bpm-jgiven</artifactId>
<version>${camunda-bpm-jgiven.version}</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion examples/junit4-platform-7/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

<!-- Test Dependencies -->
<dependency>
<groupId>org.camunda.bpm.assert</groupId>
<groupId>org.camunda.bpm</groupId>
<artifactId>camunda-bpm-assert</artifactId>
<scope>test</scope>
</dependency>
Expand Down
8 changes: 7 additions & 1 deletion examples/junit5-platform-7/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,18 @@
<artifactId>camunda-engine-spring</artifactId>
</dependency>


<!-- Test Dependencies -->
<dependency>
<groupId>org.camunda.bpm.assert</groupId>
<groupId>org.camunda.bpm</groupId>
<artifactId>camunda-bpm-assert</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.camunda.bpm</groupId>
<artifactId>camunda-bpm-junit5</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.assertj</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
23 changes: 3 additions & 20 deletions examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,7 @@
<packaging>pom</packaging>

<properties>
<camunda.version>7.16.0</camunda.version>
<zeebe.version>8.2.13</zeebe.version>
<spring-zeebe.version>8.2.4</spring-zeebe.version>
<camunda-bpm-assert.version>15.0.0</camunda-bpm-assert.version>
<camunda-bpm-jgiven.version>0.4.1</camunda-bpm-jgiven.version>
<springboot.version>2.6.7</springboot.version>
<camunda.version>${camunda.compile.version}</camunda.version>
<jacoco.skip>true</jacoco.skip>
<dokka.skip>true</dokka.skip>
<maven.javadoc.skip>true</maven.javadoc.skip>
Expand All @@ -41,7 +36,7 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${springboot.version}</version>
<version>${spring-boot.version}</version>
<scope>import</scope>
<type>pom</type>
</dependency>
Expand All @@ -54,12 +49,6 @@
<scope>import</scope>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.camunda.bpm.assert</groupId>
<artifactId>camunda-bpm-assert</artifactId>
<version>${camunda-bpm-assert.version}</version>
<scope>test</scope>
</dependency>

<!-- Own BOM -->
<dependency>
Expand All @@ -70,12 +59,6 @@
<type>pom</type>
</dependency>

<dependency>
<groupId>io.holunda.testing</groupId>
<artifactId>camunda-bpm-jgiven</artifactId>
<version>${camunda-bpm-jgiven.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
Expand Down Expand Up @@ -121,7 +104,7 @@
</reporting>
<profiles>
<profile>
<id>java11</id>
<id>jdk11</id>
<activation>
<jdk>[11,)</jdk>
</activation>
Expand Down
11 changes: 0 additions & 11 deletions examples/spring-starter-platform-7/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,12 @@
<groupId>org.camunda.bpm.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.camunda.bpm.assert</groupId>
<artifactId>camunda-bpm-assert-assertj3-11-1</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.camunda.bpm.assert</groupId>
<artifactId>camunda-bpm-assert</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.assertj</groupId>
Expand Down
8 changes: 1 addition & 7 deletions examples/spring-test-platform-7/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,14 @@
<groupId>org.camunda.bpm.springboot</groupId>
<artifactId>camunda-bpm-spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.camunda.bpm.assert</groupId>
<artifactId>camunda-bpm-assert-assertj3-11-1</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.camunda.bpm.assert</groupId>
<groupId>org.camunda.bpm</groupId>
<artifactId>camunda-bpm-assert</artifactId>
<scope>test</scope>
</dependency>
Expand Down
4 changes: 2 additions & 2 deletions examples/spring-test-platform-8/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@

<!-- Test Dependencies -->
<dependency>
<groupId>io.camunda</groupId>
<artifactId>spring-zeebe-test-testcontainer</artifactId>
<groupId>io.camunda.spring</groupId>
<artifactId>spring-boot-starter-camunda-test-testcontainer</artifactId>
<version>${spring-zeebe.version}</version>
<scope>test</scope>
</dependency>
Expand Down
16 changes: 6 additions & 10 deletions extension/junit5-platform-7/pom.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<properties>
<camunda-bpm-junit5.version>1.1.0</camunda-bpm-junit5.version>
</properties>
<parent>
<artifactId>camunda-process-test-coverage-parent</artifactId>
<groupId>org.camunda.community.process_test_coverage</groupId>
Expand All @@ -12,11 +9,10 @@
<name>Camunda Process Test Coverage JUnit5 Platform 7</name>
<artifactId>camunda-process-test-coverage-junit5-platform-7</artifactId>


<dependencies>
<!-- We intentionally always compile against latest Camunda release,
but test against many versions *provided* by user projects.
Therefore the tests are in a separate module. -->
Therefor the tests are in a separate module. -->
<dependency>
<groupId>org.camunda.bpm</groupId>
<artifactId>camunda-engine</artifactId>
Expand All @@ -35,6 +31,11 @@
<artifactId>camunda-engine-spring</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.camunda.bpm</groupId>
<artifactId>camunda-bpm-junit5</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
Expand All @@ -48,11 +49,6 @@
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
</dependency>
<dependency>
<groupId>org.camunda.bpm.extension</groupId>
<artifactId>camunda-bpm-junit5</artifactId>
<version>${camunda-bpm-junit5.version}</version>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions extension/spring-test-platform-8/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@
</dependency>

<dependency>
<groupId>io.camunda</groupId>
<artifactId>spring-zeebe-test-testcontainer</artifactId>
<groupId>io.camunda.spring</groupId>
<artifactId>spring-boot-starter-camunda-test-testcontainer</artifactId>
<version>${spring-zeebe.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.camunda</groupId>
<artifactId>spring-zeebe-starter</artifactId>
<groupId>io.camunda.spring</groupId>
<artifactId>spring-boot-starter-camunda</artifactId>
<version>${spring-zeebe.version}</version>
<scope>test</scope>
</dependency>
Expand Down
Loading

0 comments on commit 423e705

Please sign in to comment.