Skip to content

MutationTest Coverage

Sven Ruppert edited this page Apr 25, 2018 · 2 revisions

MutationTest-Coverage

To add Mutation Testing to your project wou have to add

After the dependency´s are added, and the plugins are activated, the coverage report can be created after all tests as green.

For this change the maven command from mvn clean install into mvn clean test pitest:mutationCoverage

After the run, the report will be in the folder target/pit-reports/

docker run -it --rm --name compileJDK08 \
-v "$HOME/.m2":/root/.m2 \
-v "$(pwd)":/usr/src/mymaven \
-w /usr/src/mymaven \
maven:3.5-jdk-8 \
mvn clean test  pitest:mutationCoverage
docker run -it --rm --name compileJDK09 \
-v "$HOME/.m2":/root/.m2 \
-v "$(pwd)":/usr/src/mymaven \
-w /usr/src/mymaven \
maven:3.5-jdk-9 \
mvn clean test  pitest:mutationCoverage

PiTest is not working right now with JDK10 (18.04.2018)

docker run -it --rm --name compileJDK10 \
-v "$HOME/.m2":/root/.m2 \
-v "$(pwd)":/usr/src/mymaven \
-w /usr/src/mymaven \
maven:3.5-jdk-10 \
mvn clean test  pitest:mutationCoverage

Sidebar

Clone this wiki locally