Zeebe-test JUnit 5 support

Do you have any plans to migrate zeebe-test to Junit 5?
I haven’t found any open issue for that. Only this one: https://github.com/zeebe-io/zeebe/issues/687. But that was a while ago.

1 Like

Hi @extr,

thank you for raising this up.
Currently, we have no concrete plan to migrate zeebe-test to JUnit5. We’re not yet sure what is the best way to write such tests. It depends also on what you want to test (e.g. the workflow itself, including the job workers, etc.).

Instead of zeebe-test, I recommend using https://github.com/zeebe-io/zeebe-test-container. Or, have a look at https://github.com/zeebe-io/bpmn-spec.

Related issue: https://github.com/zeebe-io/zeebe/issues/3419

Best regards,

Thanks for the answer @philipp.ossler,

So, I need to extract variables from the workflow instance and do some asserts (like with ZeebeTestRule). We are already using zeebe-test-container and I haven’t found any solutions to do that. Maybe I missed something?

It depends on your use case. One option is to create the workflow instance and await the result (https://docs.camunda.io/docs/product-manuals/concepts/workflow-instance-creation#create-and-await-results).

For example:

Does this help you?

Unfortunately, this is not exactly what I need. I want to verify that the sent variables were serialized in the correct way and exist in the context of workflow instance

I assume that you have a job worker that completes the jobs with variables. Now, you want to verify that the variables are passed to the workflow instance. Is this correct?

One option to capture the variables is by using the job worker. You can mock or instrument a job worker later in the workflow. It retrieved all variables and allows to check if the expected variables are present.


Yes, this solution can be applied in our case.

Thank you, @philipp.ossler!