The plugin's generator
goal runs within Maven's default lifecycle in phase generate-test-sources
(run mvn generate-test-sources
to see the generator's log).
It generates the test code under target/bpmndt
and adds this directory as test source directory, which is automatically compiled during the test-compile
phase.
The compilation results (test cases and API classes) will be available in the test classpath afterwards.
target/bpmndt
> Mark Directory as
> Test Sources Root
<plugin>
<groupId>org.camunda.community</groupId>
<artifactId>bpmn-driven-testing-8-maven-plugin</artifactId>
<version>0.11.0</version>
<executions>
<execution>
<goals>
<goal>generator</goal>
</goals>
</execution>
</executions>
</plugin>
Please see Maven Central to get a specific version.
Available parameters for the plugin's generator
goal:
Parameter | Type | Description | Default value |
---|---|---|---|
packageName | String | Package name, used for the generated test sources | generated |
Add dependencies, which are required to execute the generated test code:
<dependency>
<groupId>org.immutables</groupId>
<artifactId>annotate</artifactId>
<version>2.10.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.immutables</groupId>
<artifactId>value-annotations</artifactId>
<version>2.10.0</version>
<scope>provided</scope>
</dependency>
<!-- Test -->
<dependency>
<groupId>io.camunda</groupId>
<artifactId>zeebe-process-test-extension</artifactId>
<version>${camunda.zeebe.version}</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>${junit.jupiter.version}</version>
<scope>test</scope>
</dependency>
Recommended versions:
Dependency | Version |
---|---|
Zeebe Process Test Extension | 8.4.4 |
JUnit 5 (Jupiter) | 5.10.1 |
Beside unit tests, a set of integration tests exist, which verify that the Maven plugin works correctly when executed within a Maven build. The integration tests are implemented using the Robot Framework (Java implementation).
To execute unit and integration tests, run:
mvn clean integration-test -pl maven-plugin-8 -am
The Robot test report is written to target/robot/report.html
.