pom.xml: enable pitest mutation testing plugin
This commit is contained in:
parent
12a0e72758
commit
f9997db8f6
2 changed files with 80 additions and 1 deletions
42
README.md
42
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
|
||||
|
||||
|
|
39
pom.xml
39
pom.xml
|
@ -60,12 +60,17 @@
|
|||
<huntbugs.version>0.0.11</huntbugs.version>
|
||||
<jacoco-maven-plugin.version>0.7.9</jacoco-maven-plugin.version>
|
||||
<highwheel-maven.version>1.2</highwheel-maven.version>
|
||||
<pitest.version>1.2.0</pitest.version>
|
||||
<maven-jxr-plugin.version>2.5</maven-jxr-plugin.version>
|
||||
|
||||
<jacoco-class-line-covered-ratio>0.50</jacoco-class-line-covered-ratio>
|
||||
<jacoco-class-instruction-covered-ratio>0.80</jacoco-class-instruction-covered-ratio>
|
||||
<jacoco-class-missed-count-maximum>0</jacoco-class-missed-count-maximum>
|
||||
<java.version>1.8</java.version>
|
||||
<pitest.coverage>0</pitest.coverage>
|
||||
<pitest.mutation>0</pitest.mutation>
|
||||
<pitest.skip>false</pitest.skip>
|
||||
<pitest.failWhenNoMutations>true</pitest.failWhenNoMutations>
|
||||
</properties>
|
||||
|
||||
<developers>
|
||||
|
@ -361,6 +366,28 @@
|
|||
</execution>
|
||||
</executions>
|
||||
</plugin><!-- highwheel-maven -->
|
||||
|
||||
<plugin>
|
||||
<groupId>org.pitest</groupId>
|
||||
<artifactId>pitest-maven</artifactId>
|
||||
<version>${pitest.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>verify</phase>
|
||||
<goals>
|
||||
<goal>mutationCoverage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<skip>${pitest.skip}</skip>
|
||||
<timestampedReports>false</timestampedReports>
|
||||
<excludedClasses>*.Immutable*</excludedClasses>
|
||||
<coverageThreshold>${pitest.coverage}</coverageThreshold>
|
||||
<mutationThreshold>${pitest.mutation}</mutationThreshold>
|
||||
<failWhenNoMutations>${pitest.failWhenNoMutations}</failWhenNoMutations>
|
||||
</configuration>
|
||||
</plugin><!-- pitest-maven -->
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
@ -390,6 +417,18 @@
|
|||
<linkXRef>true</linkXRef>
|
||||
</configuration>
|
||||
</plugin><!-- maven-pmd-plugin -->
|
||||
<plugin>
|
||||
<groupId>org.pitest</groupId>
|
||||
<artifactId>pitest-maven</artifactId>
|
||||
<version>${pitest.version}</version>
|
||||
<reportSets>
|
||||
<reportSet>
|
||||
<reports>
|
||||
<report>report</report>
|
||||
</reports>
|
||||
</reportSet>
|
||||
</reportSets>
|
||||
</plugin><!-- pitest-maven -->
|
||||
</plugins>
|
||||
</reporting>
|
||||
|
||||
|
|
Loading…
Reference in a new issue