This project contains simple examples of how to write a unit test for Camunda Platform using the JUnit 5 extension and Camunda Platform Assert.
The project contains the following files:
src/
├── main
│ ├── java
│ └── resources
└── test
├── java
│ └── org
│ └── camunda
│ └── bpm
│ └── unittest (1)
│ ├── ProcessEngineExtensionExtendWithTest.java
│ └── ProcessEngineExtensionRegisterExtensionTest.java
└── resources
├── camunda.cfg.xml (2)
└── testProcess.bpmn (3)
Explanation:
- (1) A folder containing two java class. Each class contains a JUnit Test. They use the
ProcessEngineExtension
for bootstrapping the process engine. Each test demonstrates one way to set up theProcessEngineExtension
. Both tests also use camunda-bpm-assert to make your test life easier. - (2) Configuration file for the process engine.
- (3) An example BPMN process.
In order to run the testsuite with maven you can use:
mvn clean test
If you want to read more about Camunda Platform Assert or the [Camunda JUnit 5 extension], go to the testing user guide in the Camunda docs.