Closed saig0 closed 1 year ago
If the test class has a field with the type of the Zeebe client then the JUnit extension injects a Zeebe client for the current test run.
The injection can be used to start an external job worker or a process application for the test run.
@BpmnSpecRunner class BpmnSpecExtensionInjectionTest(private val specRunner: SpecRunner) { private lateinit var zeebeClient: ZeebeClient @BeforeEach fun `start external worker`() { zeebeClient.newWorker() .jobType("task-a") .handler { client, job -> client.newCompleteCommand(job.key) .variables(mapOf("a" to 5)) .send() .join() } .open() } }
If the test class has a field with the type of the Zeebe client then the JUnit extension injects a Zeebe client for the current test run.
The injection can be used to start an external job worker or a process application for the test run.