Annotation Interface ZeebeProcessTest
@Target(TYPE)
@Retention(RUNTIME)
@Inherited
@ExtendWith(ZeebeProcessTestExtension.class)
public @interface ZeebeProcessTest
This annotation can be used to test BPMN processes. It will run an in memory Zeebe engine. To use
this annotation Java 17 or higher is required.
Annotating test classes with this annotation will do a couple of things:
- It will manage the lifecycle of the embedded test engine
- It will create a client which can be used to interact with the engine.
- It will (optionally) inject 3 fields in your test class:
- ZeebeTestEngine - This is the engine that will run your process. It will provide some basic functionality to help you write your tests, such as waiting for an idle state and increasing the time.
- ZeebeClient - This is the client that allows you to send commands to the engine, such as starting a process instance. The interface of this client is identical to the interface you use to connect to a real Zeebe engine.
- RecordStream - This gives you access to all the records that are processed by the engine. Assertions use the records for verifying expectations. This grants you the freedom to create your own assertions.
Lifecycle:
- Before each test create a new Zeebe test engine
- Run the test
- After each test stop the Zeebe test engine
- Since:
- Java 17