DEV Community

Cover image for Add initial testing to Camunda with Spring Boot πŸƒ
Thomas Gotwig
Thomas Gotwig

Posted on


Add initial testing to Camunda with Spring Boot πŸƒ

Let's add a test to our application so that we don't have to confirm things like the User Task manually! As well as some assertions to know what got executed and what not.

Here you can find the code for this chapter under the git tag chapter-2.

For doing the assertions we need:

Enter fullscreen mode Exit fullscreen mode

And there is our final happyPath test which goes through all we did from the last article automatically! πŸ€—

class MainDelegateTest {

    @Autowired private RuntimeService runtimeService;

    @Autowired private ManagementService managementService;

    ProcessInstance pi;

    public void beforeEach() {
        pi = runtimeService.startProcessInstanceByKey(

    public void happyPath() {

    private ProcessInstanceAssert completeTask() {
        return assertThat(pi);
Enter fullscreen mode Exit fullscreen mode

loanApproval is from loanApproval.bpmn which you can find inside the Camunda Modeler when nothing is selected πŸ–ΌοΈ

complete(task()) are two static functions which are doing the clicking on Complete part from the last article for you πŸ€–

Top comments (0)

Timeless DEV post...

Git Concepts I Wish I Knew Years Ago

The most used technology by developers is not Javascript.

It's not Python or HTML.

It hardly even gets mentioned in interviews or listed as a pre-requisite for jobs.

I'm talking about Git and version control of course.

One does not simply learn git