Step 1. Add the JitPack repository to your build file
Add it in your root settings.gradle at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
Add it in your settings.gradle.kts at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
}
Add to pom.xml
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
Add it in your build.sbt at the end of resolvers:
resolvers += "jitpack" at "https://jitpack.io"
Add it in your project.clj at the end of repositories:
:repositories [["jitpack" "https://jitpack.io"]]
Step 2. Add the dependency
dependencies {
implementation 'com.github.marcinkevicius:camunda-bpm-process-test-coverage:0.2.9'
}
dependencies {
implementation("com.github.marcinkevicius:camunda-bpm-process-test-coverage:0.2.9")
}
<dependency>
<groupId>com.github.marcinkevicius</groupId>
<artifactId>camunda-bpm-process-test-coverage</artifactId>
<version>0.2.9</version>
</dependency>
libraryDependencies += "com.github.marcinkevicius" % "camunda-bpm-process-test-coverage" % "0.2.9"
:dependencies [[com.github.marcinkevicius/camunda-bpm-process-test-coverage "0.2.9"]]
# <img src="/doc/img/camunda.png" width="23" height="23"> Camunda BPM Process Test Coverage</img > <a href="https://maven-badges.herokuapp.com/maven-central/org.camunda.bpm.extension/camunda-bpm-process-test-coverage"><img src="https://maven-badges.herokuapp.com/maven-central/org.camunda.bpm.extension/camunda-bpm-process-test-coverage/badge.svg"/></a>
This Camunda BPM community extension visualises test process pathes and checks your process model coverage ratio. Running typical JUnit tests now leaves html files in your build output. Just open one and check yourself what your test did:
<a href="https://maven-badges.herokuapp.com/maven-central/org.camunda.bpm.extension/camunda-bpm-process-test-coverage"><img src="https://maven-badges.herokuapp.com/maven-central/org.camunda.bpm.extension/camunda-bpm-process-test-coverage/badge.svg" align="right"></img></a>1. Add a Maven test dependency to your project
<dependency>
<groupId>org.camunda.bpm.extension</groupId>
<artifactId>camunda-bpm-process-test-coverage</artifactId>
<version>0.2.9</version>
<scope>test</scope>
</dependency>
2. Use the ProcessCoverageInMemProcessEngineConfiguration, e.g. in your camunda.cfg.xml
<bean id="processEngineConfiguration"
class="org.camunda.bpm.extension.process_test_coverage.junit.rules.ProcessCoverageInMemProcessEngineConfiguration">
...
</bean>
3. Use the TestCoverageProcessEngineRule as your process engine JUnit rule
@Rule
@ClassRule
public static ProcessEngineRule rule = TestCoverageProcessEngineRuleBuilder.create().build();
Running your JUnit tests now leaves html files for inidividual test methods as well as whole test classes in your project's target/process-test-coverage
folder. Just open one, check yourself - and have fun with your process tests! :smile:
See a unit test example wired for Spring Testing here.
The software development team of WDW eLab GmbH is responsible for the design and implementation of this project.
WDW eLab GmbH is an innovative IT company and has great experience with complex business support processes in complex IT environments. One of our specialties are customer support processes in telecommunications. We are proud to be an official Camunda BPM partner! Feel free to contact us via Email!
Apache License, Version 2.0. See LICENSE file.