Issues while using PIT via maven

65 views
Skip to first unread message

Santiago Suarez

unread,
Jun 28, 2022, 6:31:49 PM6/28/22
to PIT Users
Good day all,

I have this set of projects for which I need to measure the mutation score and improve it if necessary.
I've added to the pom.xml file the plugin as instructed by the documentation, however when executing it shows that line coverage is 0% despite having unit tests. Also, all mutations result in NO_COVERAGE state.
After this I tried adding the plugin for Intellij IDEA and executing from there, and at this point coverage is increased and mutants end in various different states.
I have the same configuration in both ends and I'm unsure about why this is the case.
I need to get this functioning via command line with maven, since it needs to be integrated in our CI/CD pipeline.
I'm under MacOS 12.4 with an M1 chip, Open JDK 11.0.15 in the Zulu11.56+19-CA environment, Maven version 3.8.5.

In my pom I tried having a custom configuration excluding some classes but it always shows coverage as 0%. So right now I just have the import of the plugin with no configuration whatsoever.

Thanks in advance for your help.

Henry Coles

unread,
Jun 29, 2022, 2:23:49 AM6/29/22
to pitu...@googlegroups.com
If you can post a minimal executable project that reproduces the issue, I can take a look.

Henry

--
You received this message because you are subscribed to the Google Groups "PIT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pitusers+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pitusers/692257e7-b022-429e-aff5-acd57a7465b0n%40googlegroups.com.

Santiago Suarez

unread,
Jul 26, 2022, 12:58:19 AM7/26/22
to PIT Users
I managed to solve this.
The issue I was having occurred because I was using JUnit 5 and you need to add a plugin for PIT to be compatible with JUnit 5.
This is the plugin:

<dependencies>
    <dependency>
        <groupId>org.pitest</groupId>
        <artifactId>pitest-junit5-plugin</artifactId>
        <version>1.0.0</version>
    </dependency>
</dependencies>

Have a good one!
Reply all
Reply to author
Forward
0 new messages