pitest icon indicating copy to clipboard operation
pitest copied to clipboard

Coverage generation minion exited abnormally! (UNKNOWN_ERROR) with v1.9.x and 1.10.x

Open GerardSimon77 opened this issue 2 years ago • 2 comments

I have the following error when I run Pitest on my micro services :

Class, org.pitest.testapi.TestUnitExecutionListener)' of interface org.pitest.testapi.TestUnitFinder.
15:14:24 PIT >> FINE : MINION :         at org.pitest.mutationtest.config.PrioritisingTestUnitFinder.findTestUnits(PrioritisingTestUnitFinder.java:20)
15:14:24 PIT >> INFO : MINION : 15:14:24 PIT >> SEVERE : Error calculating coverage. Process will exit.
15:14:24 PIT >> FINE : MINION :         at org.pitest.testapi.execute.FindTestUnits.findTestUnits(FindTestUnits.java:64)
15:14:24 PIT >> SEVERE : Coverage generator Minion exited abnormally due to UNKNOWN_ERROR
15:14:24 PIT >> INFO : MINION : java.lang.AbstractMethodError: Receiver class org.pitest.junit5.JUnit5TestUnitFinder does not define or inherit an implementation of the resolved method 'abstract java.util.List findTestUnits(java.lang.Class, org.pitest.testapi.TestUnitExecutionListener)' of interface org.pitest.testapi.TestUnitFinder.
15:14:24 PIT >> FINE : MINION :         at org.pitest.testapi.execute.FindTestUnits.getTestUnits(FindTestUnits.java:47)
15:14:24 PIT >> INFO : MINION :         at org.pitest.mutationtest.config.PrioritisingTestUnitFinder.findTestUnits(PrioritisingTestUnitFinder.java:20)
15:14:24 PIT >> FINE : MINION :         at org.pitest.testapi.execute.FindTestUnits.findTestUnitsForAllSuppliedClasses(FindTestUnits.java:36)
15:14:24 PIT >> INFO : MINION :         at org.pitest.testapi.execute.FindTestUnits.findTestUnits(FindTestUnits.java:64)
[INFO] ------------------------------------------------------------------------15:14:24 PIT >> FINE : MINION :  at org.pitest.coverage.execute.CoverageMinion.discoverTests(CoverageMinion.java:167)
15:14:24 PIT >> INFO : MINION :         at org.pitest.testapi.execute.FindTestUnits.getTestUnits(FindTestUnits.java:47)
15:14:24 PIT >> FINE : MINION :         at org.pitest.coverage.execute.CoverageMinion.getTestsFromParent(CoverageMinion.java:153)
[INFO] BUILD FAILURE15:14:24 PIT >> INFO : MINION :     at org.pitest.testapi.execute.FindTestUnits.findTestUnitsForAllSuppliedClasses(FindTestUnits.java:36)
15:14:24 PIT >> FINE : MINION :         at org.pitest.coverage.execute.CoverageMinion.main(CoverageMinion.java:84)
15:14:24 PIT >> INFO : MINION :         at org.pitest.coverage.execute.CoverageMinion.discoverTests(CoverageMinion.java:167)
[INFO] ------------------------------------------------------------------------15:14:24 PIT >> INFO : MINION :  at org.pitest.coverage.execute.CoverageMinion.getTestsFromParent(CoverageMinion.java:153)
15:14:24 PIT >> INFO : MINION :         at org.pitest.coverage.execute.CoverageMinion.main(CoverageMinion.java:84)
[INFO] Total time:  18.204 s
[INFO] Finished at: 2023-01-19T15:14:24+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.pitest:pitest-maven:1.10.4:mutationCoverage (default-cli) on project td-ms: Execution default-cli of goal org.pitest:pitest-maven:1.10.4:mutationCoverage failed: Coverage generation minion exited abnormally! (UNKNOWN_ERROR)
[ERROR]
[ERROR] Please copy and paste the information and the complete stacktrace below when reporting an issue
[ERROR] VM : OpenJDK 64-Bit Server VM
[ERROR] Vendor : Azul Systems, Inc.
[ERROR] Version : 11.0.12+7-LTS
[ERROR] Uptime : 19079
[ERROR] Input ->
[ERROR]  1 : -Dclassworlds.conf=C:\Tools\apache-maven-3.8.3\bin\m2.conf
[ERROR]  2 : -Dmaven.home=C:\Tools\apache-maven-3.8.3
[ERROR]  3 : -Dlibrary.jansi.path=C:\Tools\apache-maven-3.8.3\lib\jansi-native
[ERROR]  4 : -Dmaven.multiModuleProjectDirectory=C:\repositories\IdeaProjects\muse-ng\td-ms
[ERROR] BootClassPathSupported : false
[ERROR]
[ERROR]
[ERROR] Please copy and paste the information and the complete stacktrace below when reporting an issue
[ERROR] VM : OpenJDK 64-Bit Server VM
[ERROR] Vendor : Azul Systems, Inc.
[ERROR] Version : 11.0.12+7-LTS
[ERROR] Uptime : 19080
[ERROR] Input ->
[ERROR]  1 : -Dclassworlds.conf=C:\Tools\apache-maven-3.8.3\bin\m2.conf
[ERROR]  2 : -Dmaven.home=C:\Tools\apache-maven-3.8.3
[ERROR]  3 : -Dlibrary.jansi.path=C:\Tools\apache-maven-3.8.3\lib\jansi-native
[ERROR]  4 : -Dmaven.multiModuleProjectDirectory=C:\repositories\IdeaProjects
\muse-ng\td-ms
[ERROR] BootClassPathSupported : false

My PIT configuration is

  <groupId>org.pitest</groupId>
  <artifactId>pitest-maven</artifactId>
    <version>1.10.4</version>
    <dependencies>
        <dependency>
            <groupId>org.pitest</groupId>
            <artifactId>pitest-junit5-plugin</artifactId>
            <version>1.1.2</version>
        </dependency>
    </dependencies>

and I use junit 5.9.2

Pitest is configured in a library on which I have no problem. But this library is the base of all my micro services and the problem occurs on all of them. I've used PITest on versions 1.8.x without problem. This error appears when I try to upgrade the tool to version 1.9.x or 1.10.x (this trace is from version 1.10.4)

GerardSimon77 avatar Jan 19 '23 14:01 GerardSimon77

Seeing the same when switching to any version higher than 1.8.0:

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  36.059 s
[INFO] Finished at: 2023-04-15T09:27:22+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.pitest:pitest-maven:1.9.0:mutationCoverage (default-cli) on project spring-data-elasticsearch: Execution default-cli of goal org.pitest:pitest-maven:1.9.0:mutationCoverage failed: Coverage generation minion exited abnormally!
[ERROR]
[ERROR] Please copy and paste the information and the complete stacktrace below when reporting an issue
[ERROR] VM : OpenJDK 64-Bit Server VM
[ERROR] Vendor : Eclipse Adoptium
[ERROR] Version : 17.0.6+10
[ERROR] Uptime : 37897
[ERROR] Input ->
[ERROR]  1 : -Dmaven.home=/xxxxx
[ERROR]  2 : -Dmaven.multiModuleProjectDirectory=/xxxxxx
[ERROR] BootClassPathSupported : false
[ERROR]
[ERROR]
[ERROR] Please copy and paste the information and the complete stacktrace below when reporting an issue
[ERROR] VM : OpenJDK 64-Bit Server VM
[ERROR] Vendor : Eclipse Adoptium
[ERROR] Version : 17.0.6+10
[ERROR] Uptime : 37898
[ERROR] Input ->
[ERROR]  1 : -Dmaven.home=/xxxxx
[ERROR]  2 : -Dmaven.multiModuleProjectDirectory=/xxxxx
[ERROR] BootClassPathSupported : false
[ERROR]
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException```

sothawo avatar Apr 15 '23 07:04 sothawo

@sothawo Pitest needs to be configured with a version of the junit 5 plugin that matches both the junit 5 version and the pitest version.

From the docs

    1.1.2 requires pitest 1.9.0 or above and JUnit Platform 1.9.2 (Jupiter 5.9.2)
    1.1.1 requires pitest 1.9.0 or above and JUnit Platform 1.9.1 (Jupiter 5.9.1)
    1.1.0 requires pitest 1.9.0 or above and JUnit Platform 1.9.1 (Jupiter 5.9.1)
    1.0.0 requires pitest 1.9.0 or above and JUnit Platform 1.8.x (Jupiter 5.8.0)
    0.16 requires pitest 1.4.0 or above and JUnit Platform 1.8.x (Jupiter 5.8.0)
    0.15 requires pitest 1.4.0 or above and JUnit Platform 1.8.x (Jupiter 5.8.0)
    0.5-0.14 requires pitest 1.4.0 or above and JUnit Platform 1.7.x (Jupiter 5.7.x)
    0.4 requires pitest 1.3.2 or above
    0.3 requires pitest 1.3.0 or 1.3.1
    0.2 requires pitest 1.2.5

Errors such as

JUnit5TestUnitFinder does not define or inherit an implementation of the resolved method 'abstract java.util.List findTestUnits(java.lang.Class, org.pitest.testapi.TestUnitExecutionListener)'

Indicate that the version of the plugin installed is not compatible with the version of pitest in use. If you have a multi module build, check that the versions are consistent in all modules.

hcoles avatar Apr 15 '23 08:04 hcoles