PIT Mutation Plugin Configuration

22 views
Skip to first unread message

Ben Green

unread,
Jan 22, 2021, 2:34:02 PM1/22/21
to Jenkins Users
We've recently installed the pit mutation plugin on our Jenkins instance. Unfortunately, we're having some issues configuring it that sound fairly similar to an issue outlined in the original github repo that the supported plugin was cloned from.

We've got a multi module build, with pitest configured in only 2 of the modules. I've attached an image of what the report looks like. Basically, it's calling the modules `Module:1` and `Module:null` instead of their actual names. 

Screenshot from 2021-01-22 17-38-36.png

There's nothing in the console output to indicate what's going wrong:

Publishing mutation report: /home/jenkins/agent/workspace/Test/mutation-test/foo/target/pit-reports/202101141602/mutations.xml
Publishing mutation report: /home/jenkins/agent/workspace/Test/mutation-test/bar/target/pit-reports/202101141559/mutations.xml
Kill ratio is 52.359% (1354 2586)


The config in my maven poms for both modules looks like this:
<plugin>
    <groupId>org.pitest</groupId>
    <artifactId>pitest-maven</artifactId>
    <version>1.6.2</version>
    <dependencies>
        <dependency>
            <groupId>org.pitest</groupId>
            <artifactId>pitest-junit5-plugin</artifactId>
            <version>0.8</version>
        </dependency>
    </dependencies>
    <configuration>
        <outputFormats>
            <param>HTML</param>
            <param>XML</param>
        </outputFormats>
    </configuration>
</plugin>

and our Jenkins pipeline task to publish the report looks like this:

return {
    stage("Publish Report") {
        echo "Publishing mutation report..."
        pitmutation(
            mutationStatsFile: '**/target/pit-reports/**/mutations.xml'
        )
    }
}

Is this something you can help with at all? Have we got this incorrectly configured?
Reply all
Reply to author
Forward
0 new messages