I followed the instructions here using the spring-testing with starter dependency:
<dependency>
<groupId>org.camunda.bpm.extension</groupId>
<artifactId>camunda-bpm-process-test-coverage-starter</artifactId>
<version>1.0.3</version>
<scope>test</scope>
</dependency>
Test class:
@SpringBootTest(args = "--jasypt.encryptor.password=xxxx")
@RunWith(SpringRunner.class)
@Deployment(resources = {"oauth_process.bpmn"})
public class OAuthFlowTest {
private static final String PROCESS_KEY = "oauthProcessFlow";
@Rule
@ClassRule
public static ProcessEngineRule engineRule = TestCoverageProcessEngineRuleBuilder.create().build();
@Test
public void ProcessStartAtFindScopeApprover() {
// bla bla bla
}
The test runs fine, but the overall coverage shows NaN (see below). What do I miss?
2022-02-08 13:17:53.564 INFO 39000 — [ main] ocessEngineCoverageTestExecutionListener : ProcessStartAtFindScopeApprover test method coverage is 0.2222222222222222
2022-02-08 13:17:53.564 INFO 39000 — [ main] .b.e.p.j.r.TestCoverageProcessEngineRule : ProcessStartAtFindScopeApprover(OAuthFlowTest) succeeded.
2022-02-08 13:17:53.564 INFO 39000 — [ main] .b.e.p.j.r.TestCoverageProcessEngineRule : ProcessStartAtFindScopeApprover test method coverage is NaN