Reputation: 39
I got this error, using the plugin of PIT tool in IntelliJ IDE for a simple program, I am using maven, also I am using Junit4. What is going wrong that is causing the error and how can I solve it?
11:44:53 AM PIT >> INFO : Incremental analysis reduced number of mutations by 0
11:44:53 AM PIT >> INFO : Created 1 mutation test units in pre scan
11:44:54 AM PIT >> INFO : Sending 2 test classes to minion
11:44:54 AM PIT >> INFO : Sent tests to minion
11:44:54 AM PIT >> SEVERE : Coverage generator Minion exited abnormally due to UNKNOWN_ERROR
Exception in thread "main" org.pitest.util.PitError: Coverage generation minion exited abnormally!
Please copy and paste the information and the complete stacktrace below when reporting an issue
VM : OpenJDK 64-Bit Server VM
Vendor : Oracle Corporation
Version : 15.0.1+9-18
Uptime : 2238
Input ->
1 : -javaagent:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.2.3\lib\idea_rt.jar=53726:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.2.3\bin
2 : -Dfile.encoding=UTF-8
BootClassPathSupported : false
Please copy and paste the information and the complete stacktrace below when reporting an issue
VM : OpenJDK 64-Bit Server VM
Vendor : Oracle Corporation
Version : 15.0.1+9-18
Uptime : 2240
Input ->
1 : -javaagent:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.2.3\lib\idea_rt.jar=53726:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.2.3\bin
2 : -Dfile.encoding=UTF-8
BootClassPathSupported : false
at org.pitest.util.Unchecked.translateCheckedException(Unchecked.java:20)
at org.pitest.coverage.execute.DefaultCoverageGenerator.calculateCoverage(DefaultCoverageGenerator.java:106)
at org.pitest.coverage.execute.DefaultCoverageGenerator.calculateCoverage(DefaultCoverageGenerator.java:52)
at org.pitest.mutationtest.tooling.MutationCoverage.runAnalysis(MutationCoverage.java:149)
at org.pitest.mutationtest.tooling.MutationCoverage.runReport(MutationCoverage.java:139)
at org.pitest.mutationtest.tooling.EntryPoint.execute(EntryPoint.java:123)
at org.pitest.mutationtest.tooling.EntryPoint.execute(EntryPoint.java:54)
at org.pitest.mutationtest.commandline.MutationCoverageReport.runReport(MutationCoverageReport.java:98)
at org.pitest.mutationtest.commandline.MutationCoverageReport.main(MutationCoverageReport.java:45)
Caused by: org.pitest.util.PitError: Coverage generation minion exited abnormally!
Please copy and paste the information and the complete stacktrace below when reporting an issue
VM : OpenJDK 64-Bit Server VM
Vendor : Oracle Corporation
Version : 15.0.1+9-18
Uptime : 2238
Input ->
1 : -javaagent:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.2.3\lib\idea_rt.jar=53726:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.2.3\bin
2 : -Dfile.encoding=UTF-8
BootClassPathSupported : false
at org.pitest.coverage.execute.DefaultCoverageGenerator.gatherCoverageData(DefaultCoverageGenerator.java:148)
at org.pitest.coverage.execute.DefaultCoverageGenerator.calculateCoverage(DefaultCoverageGenerator.java:90)
... 7 more```
__________________
Upvotes: 0
Views: 2070
Reputation: 39
After looking for everywhere a solution, I found that the latest version of PIT only works with Junit5. So, I solved it by migrating to JUnit5
if you are using maven, add the following lines to your pom file:
<properties>
<junit.jupiter.version>5.8.1</junit.jupiter.version>
<junit.platform.version>1.8.1</junit.platform.version>
</properties>
<dependencies>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${junit.jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>${junit.jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<version>${junit.jupiter.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-suite</artifactId>
<version>${junit.platform.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
Upvotes: 3