i see the following stacktrace when running the pitest gradle task in my project after adding all the required configurations in build.gradle. Can you please help me on this ? I'm using 1.5.1 version of the plugin.
The changes have been done in build.gradle as per the instructions in https://github.com/szpak/gradle-pitest-plugin
7:00:32 PM PIT >> INFO : Verbose logging is disabled. If you encounter a problem, please enable it before reporting an issue.
7:00:33 PM PIT >> INFO : Sending 46 test classes to minion
7:00:33 PM PIT >> INFO : Sent tests to minion
7:00:33 PM PIT >> SEVERE : Error generating coverage. Please check that your classpath contains modern JUnit 4 or PIT test plugin for other test tool (JUnit 5, TestNG, ...) is enabled.
Exception in thread "main" org.pitest.util.PitError: Coverage generation minion exited abnormally. Please check the classpath and/or enable test plugin for used test tool.
Please copy and paste the information and the complete stacktrace below when reporting an issue
VM : OpenJDK 64-Bit Server VM
Vendor : Private Build
Version : 25.252-b09
Uptime : 1723
Input ->
1 : -Dfile.encoding=UTF-8
2 : -Duser.country=US
3 : -Duser.language=en
4 : -Duser.variant
BootClassPathSupported : true
Please copy and paste the information and the complete stacktrace below when reporting an issue
VM : OpenJDK 64-Bit Server VM
Vendor : Private Build
Version : 25.252-b09
Uptime : 1724
Input ->
1 : -Dfile.encoding=UTF-8
2 : -Duser.country=US
3 : -Duser.language=en
4 : -Duser.variant
BootClassPathSupported : true
at org.pitest.util.Unchecked.translateCheckedException(Unchecked.java:20)
at org.pitest.coverage.execute.DefaultCoverageGenerator.calculateCoverage(DefaultCoverageGenerator.java:105)
at org.pitest.coverage.execute.DefaultCoverageGenerator.calculateCoverage(DefaultCoverageGenerator.java:51)
at org.pitest.mutationtest.tooling.MutationCoverage.runReport(MutationCoverage.java:115)
at org.pitest.mutationtest.tooling.EntryPoint.execute(EntryPoint.java:121)
at org.pitest.mutationtest.tooling.EntryPoint.execute(EntryPoint.java:51)
at org.pitest.mutationtest.commandline.MutationCoverageReport.runReport(MutationCoverageReport.java:87)
at org.pitest.mutationtest.commandline.MutationCoverageReport.main(MutationCoverageReport.java:45)
Caused by: org.pitest.util.PitError: Coverage generation minion exited abnormally. Please check the classpath and/or enable test plugin for used test tool.
Please copy and paste the information and the complete stacktrace below when reporting an issue
VM : OpenJDK 64-Bit Server VM
Vendor : Private Build
Version : 25.252-b09
Uptime : 1723
Input ->
1 : -Dfile.encoding=UTF-8
2 : -Duser.country=US
3 : -Duser.language=en
4 : -Duser.variant
BootClassPathSupported : true
at org.pitest.coverage.execute.DefaultCoverageGenerator.gatherCoverageData(DefaultCoverageGenerator.java:143)
at org.pitest.coverage.execute.DefaultCoverageGenerator.calculateCoverage(DefaultCoverageGenerator.java:89)
... 6 more
FAILURE: Build failed with an exception.
As per the error message, you do not have the pitest junit 5 plugin enabled.
If you add
junit5PluginVersion = '0.12'
To the configuration the plugin will be enabled and the tests should be picked up.