Integration tests for single service task

Hi all,

me and my team are new to camunda and we have a question conercning integration testing our first camunda process.

Actually our process consists of several service tasks and our idea for the integration test was initially to write one test for every service task. We already junit test the whole process with it’s different paths depending on various process variables which already works fine.

I know that a process can be startet after or before a activity, but how can be ensured that only one service task is being executed? I’ve found that the runtimeService provides the possibility for “createProcessInstanceModification” and especially “cancelAllForActivity”, but it expects a process-instance-id and that is missing before I started the process.

Hope I could explain our problem and looking forward for any suggestions (best practises).

br,
Peter

1 Like