szpak / gradle-pitest-plugin

Gradle plugin for PIT Mutation Testing
http://gradle-pitest-plugin.solidsoft.info/
212 stars 57 forks source link

Coverage generation minion exited abnormally! #305

Closed mkutz closed 2 years ago

mkutz commented 2 years ago

I'm trying to add PIT in my Gradle project, but get an exception when running ./gradlew pitest:

VM : OpenJDK 64-Bit Server VM
Vendor : Eclipse Adoptium
Version : 11.0.13+8
Uptime : 1252
Input -> 
 1 : -Dfile.encoding=UTF-8
 2 : -Duser.country=DE
 3 : -Duser.language=de
 4 : -Duser.variant
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:125)
        at org.pitest.mutationtest.tooling.EntryPoint.execute(EntryPoint.java:52)
        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!

Here's the full stacktrace

szpak commented 2 years ago

Please:

  1. Enable PIT verbose mode in the plugin configuration - it should give a reason why it failed,
  2. Run the pitest task with --info and paste a PIT execution command line (especially the classpath - can be redacted). It might be caused by the JUnit 4/5 misconfiguration.

I wonder, if it started to fail unexpectedly or you are configuring it for a new project?

mkutz commented 2 years ago

Yeah, OK. That was a trivial. I'm using JUnit 5. Followed this and it worked immediately.

I tried to add it to a new project. So it never worked.

Given that JUnit 5 becomes more and more popular, I'd suggest to make that a bit more prominent in the README.md.

Anyway thanks for the quick reply and the good work in general!