hcoles / pitest

State of the art mutation testing system for the JVM
Apache License 2.0
1.7k stars 357 forks source link

PitError: Coverage generation minion exited abnormally! #537

Open michielgkalkman opened 5 years ago

michielgkalkman commented 5 years ago

Please have a look at https://github.com/michielgkalkman/PmdPlus/commit/fd84044f487517307c5b3772841d710f4179da3e

When running mvn -e clean install org.pitest:pitest-maven:mutationCoverage

I get a PitError: Caused by: org.pitest.util.PitError: Coverage generation minion exited abnormall y!

See the entire stacktrace below.

BTW: maybe it is an idea to add the location where the issue needs to be reported, because I wondered for while whether it was a vm issue or not.

Thanks and regards, Michiel

Caused by: org.pitest.util.PitError: Coverage generation minion exited abnormall
y!

Please copy and paste the information and the complete stacktrace below when rep
orting an issue
VM : Java HotSpot(TM) 64-Bit Server VM
Vendor : Oracle Corporation
Version : 25.191-b12
Uptime : 24878
Input ->
 1 : -Dclassworlds.conf=C:\j3\apache-maven\apache-maven-3.5.4\bin\..\bin\m2.conf

 2 : -Dmaven.home=C:\j3\apache-maven\apache-maven-3.5.4\bin\..
 3 : -Dlibrary.jansi.path=C:\j3\apache-maven\apache-maven-3.5.4\bin\..\lib\jansi
-native
 4 : -Dmaven.multiModuleProjectDirectory=C:\Users\nl02032\projects\PmdPlus
BootClassPathSupported : true

Please copy and paste the information and the complete stacktrace below when rep
orting an issue
VM : Java HotSpot(TM) 64-Bit Server VM
Vendor : Oracle Corporation
Version : 25.191-b12
Uptime : 24879
Input ->
 1 : -Dclassworlds.conf=C:\j3\apache-maven\apache-maven-3.5.4\bin\..\bin\m2.conf

 2 : -Dmaven.home=C:\j3\apache-maven\apache-maven-3.5.4\bin\..
 3 : -Dlibrary.jansi.path=C:\j3\apache-maven\apache-maven-3.5.4\bin\..\lib\jansi
-native
 4 : -Dmaven.multiModuleProjectDirectory=C:\Users\nl02032\projects\PmdPlus
BootClassPathSupported : true

    at org.pitest.util.Unchecked.translateCheckedException (Unchecked.java:20)
    at org.pitest.coverage.execute.DefaultCoverageGenerator.calculateCoverage (D
efaultCoverageGenerator.java:103)
    at org.pitest.coverage.execute.DefaultCoverageGenerator.calculateCoverage (D
efaultCoverageGenerator.java:49)
    at org.pitest.mutationtest.tooling.MutationCoverage.runReport (MutationCover
age.java:115)
    at org.pitest.mutationtest.tooling.EntryPoint.execute (EntryPoint.java:116)
    at org.pitest.mutationtest.tooling.EntryPoint.execute (EntryPoint.java:49)
    at org.pitest.maven.RunPitStrategy.execute (RunPitStrategy.java:35)
    at org.pitest.maven.AbstractPitMojo.analyse (AbstractPitMojo.java:436)
    at org.pitest.maven.AbstractPitMojo.execute (AbstractPitMojo.java:377)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBui
ldPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.ja
va:208)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.ja
va:154)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.ja
va:146)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (
LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (
LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreaded
Builder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleSt
arter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:954)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.jav
a:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessor
Impl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launche
r.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:2
29)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launc
her.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356
)
Caused by: org.pitest.util.PitError: Coverage generation minion exited abnormall
y!

Please copy and paste the information and the complete stacktrace below when rep
orting an issue
VM : Java HotSpot(TM) 64-Bit Server VM
Vendor : Oracle Corporation
Version : 25.191-b12
Uptime : 24878
Input ->
 1 : -Dclassworlds.conf=C:\j3\apache-maven\apache-maven-3.5.4\bin\..\bin\m2.conf

 2 : -Dmaven.home=C:\j3\apache-maven\apache-maven-3.5.4\bin\..
 3 : -Dlibrary.jansi.path=C:\j3\apache-maven\apache-maven-3.5.4\bin\..\lib\jansi
-native
 4 : -Dmaven.multiModuleProjectDirectory=C:\Users\nl02032\projects\PmdPlus
BootClassPathSupported : true

    at org.pitest.coverage.execute.DefaultCoverageGenerator.gatherCoverageData (
DefaultCoverageGenerator.java:142)
    at org.pitest.coverage.execute.DefaultCoverageGenerator.calculateCoverage (D
efaultCoverageGenerator.java:87)
    at org.pitest.coverage.execute.DefaultCoverageGenerator.calculateCoverage (D
efaultCoverageGenerator.java:49)
    at org.pitest.mutationtest.tooling.MutationCoverage.runReport (MutationCover
age.java:115)
    at org.pitest.mutationtest.tooling.EntryPoint.execute (EntryPoint.java:116)
    at org.pitest.mutationtest.tooling.EntryPoint.execute (EntryPoint.java:49)
    at org.pitest.maven.RunPitStrategy.execute (RunPitStrategy.java:35)
    at org.pitest.maven.AbstractPitMojo.analyse (AbstractPitMojo.java:436)
    at org.pitest.maven.AbstractPitMojo.execute (AbstractPitMojo.java:377)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBui
ldPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.ja
va:208)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.ja
va:154)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.ja
va:146)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (
LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (
LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreaded
Builder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleSt
arter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:954)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.jav
a:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessor
Impl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launche
r.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:2
29)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launc
her.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:356
)
[ERROR]
[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 rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutio
nException
komaldoshi commented 4 years ago

Hi, I am running into same error, Any pointers

michielgkalkman commented 4 years ago

Nope. No pointers.

I upgraded to pitest 5.1.2 (https://github.com/michielgkalkman/PmdPlus/tree/pitest%23537) but this results also in "Coverage generation minion exited abnormally!":

[ERROR] Failed to execute goal org.pitest:pitest-maven:1.5.2:mutationCoverage (default-cli) on project PmdPlus: Execution default-cli of goal org.pitest:pitest-maven:1.5.2: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 : Amazon.com Inc. [ERROR] Version : 11.0.7+10-LTS [ERROR] Uptime : 16231 [ERROR] Input -> [ERROR] 1 : -Dclassworlds.conf=C:\j3\apache-maven-3.6.3\bin..\bin\m2.conf [ERROR] 2 : -Dmaven.home=C:\j3\apache-maven-3.6.3\bin.. [ERROR] 3 : -Dlibrary.jansi.path=C:\j3\apache-maven-3.6.3\bin..\lib\jansi-native [ERROR] 4 : -Dmaven.multiModuleProjectDirectory=C:\try\pitest\PmdPlus [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 : Amazon.com Inc. [ERROR] Version : 11.0.7+10-LTS [ERROR] Uptime : 16232 [ERROR] Input -> [ERROR] 1 : -Dclassworlds.conf=C:\j3\apache-maven-3.6.3\bin..\bin\m2.conf [ERROR] 2 : -Dmaven.home=C:\j3\apache-maven-3.6.3\bin.. [ERROR] 3 : -Dlibrary.jansi.path=C:\j3\apache-maven-3.6.3\bin..\lib\jansi-native [ERROR] 4 : -Dmaven.multiModuleProjectDirectory=C:\try\pitest\PmdPlus [ERROR] BootClassPathSupported : false [ERROR] [ERROR] -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.pitest:pitest-maven:1.5.2:mutationCoverage (default-cli) on project PmdPlus: Execution default-cli of goal org.pitest:pitest-maven:1.5.2:mutationCoverage failed: 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 : Amazon.com Inc. Version : 11.0.7+10-LTS Uptime : 16231 Input -> 1 : -Dclassworlds.conf=C:\j3\apache-maven-3.6.3\bin..\bin\m2.conf 2 : -Dmaven.home=C:\j3\apache-maven-3.6.3\bin.. 3 : -Dlibrary.jansi.path=C:\j3\apache-maven-3.6.3\bin..\lib\jansi-native 4 : -Dmaven.multiModuleProjectDirectory=C:\try\pitest\PmdPlus BootClassPathSupported : false

Please copy and paste the information and the complete stacktrace below when reporting an issue VM : OpenJDK 64-Bit Server VM Vendor : Amazon.com Inc. Version : 11.0.7+10-LTS Uptime : 16232 Input -> 1 : -Dclassworlds.conf=C:\j3\apache-maven-3.6.3\bin..\bin\m2.conf 2 : -Dmaven.home=C:\j3\apache-maven-3.6.3\bin.. 3 : -Dlibrary.jansi.path=C:\j3\apache-maven-3.6.3\bin..\lib\jansi-native 4 : -Dmaven.multiModuleProjectDirectory=C:\try\pitest\PmdPlus BootClassPathSupported : false

at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)

Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-cli of goal org.pitest:pitest-maven:1.5.2:mutationCoverage failed: 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 : Amazon.com Inc. Version : 11.0.7+10-LTS Uptime : 16231 Input -> 1 : -Dclassworlds.conf=C:\j3\apache-maven-3.6.3\bin..\bin\m2.conf 2 : -Dmaven.home=C:\j3\apache-maven-3.6.3\bin.. 3 : -Dlibrary.jansi.path=C:\j3\apache-maven-3.6.3\bin..\lib\jansi-native 4 : -Dmaven.multiModuleProjectDirectory=C:\try\pitest\PmdPlus BootClassPathSupported : false

Please copy and paste the information and the complete stacktrace below when reporting an issue VM : OpenJDK 64-Bit Server VM Vendor : Amazon.com Inc. Version : 11.0.7+10-LTS Uptime : 16232 Input -> 1 : -Dclassworlds.conf=C:\j3\apache-maven-3.6.3\bin..\bin\m2.conf 2 : -Dmaven.home=C:\j3\apache-maven-3.6.3\bin.. 3 : -Dlibrary.jansi.path=C:\j3\apache-maven-3.6.3\bin..\lib\jansi-native 4 : -Dmaven.multiModuleProjectDirectory=C:\try\pitest\PmdPlus BootClassPathSupported : false

at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:148)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)

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 : Amazon.com Inc. Version : 11.0.7+10-LTS Uptime : 16231 Input -> 1 : -Dclassworlds.conf=C:\j3\apache-maven-3.6.3\bin..\bin\m2.conf 2 : -Dmaven.home=C:\j3\apache-maven-3.6.3\bin.. 3 : -Dlibrary.jansi.path=C:\j3\apache-maven-3.6.3\bin..\lib\jansi-native 4 : -Dmaven.multiModuleProjectDirectory=C:\try\pitest\PmdPlus BootClassPathSupported : false

Please copy and paste the information and the complete stacktrace below when reporting an issue VM : OpenJDK 64-Bit Server VM Vendor : Amazon.com Inc. Version : 11.0.7+10-LTS Uptime : 16232 Input -> 1 : -Dclassworlds.conf=C:\j3\apache-maven-3.6.3\bin..\bin\m2.conf 2 : -Dmaven.home=C:\j3\apache-maven-3.6.3\bin.. 3 : -Dlibrary.jansi.path=C:\j3\apache-maven-3.6.3\bin..\lib\jansi-native 4 : -Dmaven.multiModuleProjectDirectory=C:\try\pitest\PmdPlus BootClassPathSupported : false

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.maven.RunPitStrategy.execute (RunPitStrategy.java:35)
at org.pitest.maven.AbstractPitMojo.analyse (AbstractPitMojo.java:463)
at org.pitest.maven.AbstractPitMojo.execute (AbstractPitMojo.java:404)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)

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 : Amazon.com Inc. Version : 11.0.7+10-LTS Uptime : 16231 Input -> 1 : -Dclassworlds.conf=C:\j3\apache-maven-3.6.3\bin..\bin\m2.conf 2 : -Dmaven.home=C:\j3\apache-maven-3.6.3\bin.. 3 : -Dlibrary.jansi.path=C:\j3\apache-maven-3.6.3\bin..\lib\jansi-native 4 : -Dmaven.multiModuleProjectDirectory=C:\try\pitest\PmdPlus BootClassPathSupported : false

at org.pitest.coverage.execute.DefaultCoverageGenerator.gatherCoverageData (DefaultCoverageGenerator.java:148)
at org.pitest.coverage.execute.DefaultCoverageGenerator.calculateCoverage (DefaultCoverageGenerator.java:89)
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.maven.RunPitStrategy.execute (RunPitStrategy.java:35)
at org.pitest.maven.AbstractPitMojo.analyse (AbstractPitMojo.java:463)
at org.pitest.maven.AbstractPitMojo.execute (AbstractPitMojo.java:404)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)

[ERROR] [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

michielgkalkman commented 4 years ago

The problem seems to be twofold: 1) a custom runner is used (PMDTestRunner). 2) this results in a description that has classname "Unit Tests". This results in a ClassNotFoundException.

If I get all children recursively and then ignore ClassNotFoundExceptions and all descriptions that are not tests, I get my pitest report which seems OK.

The code I changed/added is in JUnitCustomRunnerTestUnitFinder:

  private List<TestUnit> splitIntoFilteredUnits(final Description description) {
    final ArrayList<Description> allChildren = getChildren(description);

    return allChildren.stream()
            .filter(description1 -> {
              try {
                LOG.log(Level.SEVERE, "PitErrorx?:" + description1.getDisplayName() + ":" + description1.getClassName());
                IsolationUtils.convertForClassLoader(
                        IsolationUtils.getContextClassLoader(), description1.getClassName());
              } catch (PitError classNotFoundException) {
                  LOG.log(Level.SEVERE, "PitErrorx:" + description1.getDisplayName() + ":" + description1.getClassName());
                return false;
              }
              return true;
            })
        .filter(isTest())
        .map(descriptionToTestUnit())
        .collect(Collectors.toList());
  }

  private ArrayList<Description> getChildren(Description description) {
    final ArrayList<Description> collect = description.getChildren().stream()
            .map(child -> {
              return getChildren(child);
            }).collect(ArrayList<Description>::new, ArrayList::addAll, ArrayList::addAll);
    collect.add(description);
    return collect;
  }

(just some prototyping)

However, using this code results in test errors:

Failed tests: JUnitCustomRunnerTestUnitFinderTest.shouldNotFindTestsInCustomSuite:152 null JUnitCustomRunnerTestUnitFinderTest.shouldNotFindTestsInNestedCustomSuites:176 null JUnitCustomRunnerTestUnitFinderTest.shouldNotHaltWhenRunnerThrowsRuntimeException:372 null TestJUnitConfiguration.shouldSplitTestInSuitesIntoSeperateUnitsWhenUsingNonStandardSuiteRunners:414 expected:<4> but was:<8>

So, I started investigating tests 1&2 and I do not understand them.

In JUnitCustomRunnerTestUnitFinderTest::shouldNotFindTestsInCustomSuite there are 0 test units expected. I would expect 4, as there is one suite of 2 classes with each 2 methods.

Can someone explain why there are only 0 expected?

And furthermore: can somebody explain to me what TestUnitFinder::findTestUnits must return?

In comparison: in ParameterisedJUnitTestFinderTest::shouldCreateTestUnitForEachParameterMethodCombinationOfParameterizedTest there are 8 test units returned. Which sounds logical to me as there four parameters and two test methods.

Thanks in advance!

hcoles commented 4 years ago

Hi @michielgkalkman sorry for the slow response.

Supporting the unbounded set of possible junit runners is a bit of nightmare and the code is not pretty. Pitest has a long standing design flaw in that it always tries to split tests down into smaller units of execution, and maintains a blacklist of customer runners for which this doesn't work. It should really be the other way round with a whitelist.

I suspect that PMDTestRunner falls into this category, and the fix that you need is as simple as adding it to the blacklist in JUnitCustomRunnerTestUnitFinder

  private boolean runnerCannotBeSplit(final Runner runner) {
    final String runnerName = runner.getClass().getName();
    return runnerName.equals("junitparams.JUnitParamsRunner")
        || runnerName.startsWith("org.spockframework.runtime.Sputnik")
        || runnerName.startsWith("com.insightfullogic.lambdabehave")
        || runnerName.startsWith("com.googlecode.yatspec")
        || runnerName.startsWith("com.google.gwtmockito.GwtMockitoTestRunner");
  }

That said, unless PMDTestRunner does something different from what I assume it does, then it probably makes most sense to exclude it completely from being run by test.

These "tests" are not really tests - they will not be execute any of the code under test, just run style rules against their source. They could never kill a mutant generated at the bytecode level.

StefanPenndorf commented 4 years ago

According to the PMD project I found at github the PMDTestRunner is part of the PMD test framework. It doesn't check code style but tests the detection rules for PMD themselves.

Thus it doesn't make sense to exclude it completely but it might be necessary to prevent it from being split.