/pitest-mutation-testing-elements-plugin

A pitest plugin that maps pitest results to mutation-testing-elements' format

Primary LanguageJavaApache License 2.0Apache-2.0

Maven Central Build status

pitest-mutation-testing-elements-plugin

A pitest plugin that maps pitest results to stryker's mutation-testing-elements.

How to use 💁

Maven

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

Gradle

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']
}

Preview 🔮

This is a result of pitest run on this plugin. (More previews here) preview