From f9997db8f6a50aac99acdd593332999245a9a54b Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Tue, 30 May 2017 21:22:27 +0100 Subject: [PATCH] pom.xml: enable pitest mutation testing plugin --- README.md | 42 +++++++++++++++++++++++++++++++++++++++++- pom.xml | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 08ea14f..a8ab584 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,7 @@ desired value. * huntbugs.version * jacoco-maven-plugin.version * highwheel-maven.version +* pitest.version * maven-jxr-plugin.version * jacoco-class-line-covered-ratio * jacoco-class-instruction-covered-ratio @@ -197,7 +198,46 @@ classes. ### Configuration -The plugin will `analyse` the project during the `compile` phase. +The plugin will `analyse` the project during the `verify` phase. + +## Pitest Plugin + +The [Pitest Plugin](http://pitest.org/) +provides mutation testing for classes found in the generated `target` +directory. + +### Configuration + +The plugin with perform mutation tests during the `verify` phase. + +By default, classed named `Immutable*`, will not be included. +(e.g. classes generated by `org.immutables:value`) + +The following properties can adjust the default configuration. + +#### `pitest.skip` + +Default is `false`. + +Set this to `true` to disable the **Pitest Plugin**. + +#### `pitest.coverage` + +Default is `0`%. (i.e. disabled) + +Line coverage at which to fail build. + +#### `pitest.mutation` + +Default is `0`%. (i.e. disabled) + +Mutation score threshold at which to fail build. + +#### `pitest.failWhenNoMutations` + +Default is `true`. + +Set this to `false` to not fail build when there are no mutations. ## Digraph Dependency Plugin diff --git a/pom.xml b/pom.xml index 22e7042..abc995a 100644 --- a/pom.xml +++ b/pom.xml @@ -60,12 +60,17 @@ 0.0.11 0.7.9 1.2 + 1.2.0 2.5 0.50 0.80 0 1.8 + 0 + 0 + false + true @@ -361,6 +366,28 @@ + + + org.pitest + pitest-maven + ${pitest.version} + + + verify + + mutationCoverage + + + + + ${pitest.skip} + false + *.Immutable* + ${pitest.coverage} + ${pitest.mutation} + ${pitest.failWhenNoMutations} + + @@ -390,6 +417,18 @@ true + + org.pitest + pitest-maven + ${pitest.version} + + + + report + + + +