A pitest plugin that maps pitest results to stryker's mutation-testing-elements.
- Add the dependency to the pitest plugin
- Configure the outputFormat to be one of
HTML2
for Stryker HTML reportJSON
for a JSON file of stryker mutation-testing-elements format
Add the dependency and configure the outputFormat
to use the plugin:
<plugin>
<groupId>org.pitest</groupId>
<artifactId>pitest-maven</artifactId>
<version>1.4.10</version>
<dependencies>
<dependency>
<groupId>io.github.wmaarts</groupId>
<artifactId>pitest-mutation-testing-elements-plugin</artifactId>
<version>${pitest-mutation-testing-elements-plugin.version}</version>
</dependency>
</dependencies>
<configuration>
<outputFormats>
<format>HTML2</format>
<format>JSON</format>
</outputFormats>
</configuration>
</plugin>
Run like you would normally run pitest: ▶
mvn org.pitest:pitest-maven:mutationCoverage
Follow the setup for the gradle-pitest-plugin, then add the plugin as a pitest dependency in your build.gradle
:
buildscript {
repositories {
mavenCentral()
}
configurations.maybeCreate('pitest')
dependencies {
classpath 'info.solidsoft.gradle.pitest:gradle-pitest-plugin:1.4.7'
pitest 'io.github.wmaarts:pitest-mutation-testing-elements-plugin:${pluginVersion}'
}
}
And configure the output format:
apply plugin: 'info.solidsoft.pitest'
pitest {
outputFormats = ['HTML2', 'JSON']
}
This is a result of pitest run on this plugin. (More previews here)