pitest / pitest-junit5-plugin

JUnit 5 test framework support for Pitest
Apache License 2.0
74 stars 26 forks source link

Coverage generator Minion exited abnormally due to UNKNOWN_ERROR #72

Open mohimoradi opened 1 year ago

mohimoradi commented 1 year ago

I'm trying to run PITest with the JUnit 5 plugin in the following small project. https://github.com/kiamesdavies/money-transfer

But when I run PITest, the following errors are given. Is there a way to make the plugin operate on that project?

[INFO] Plugin available : Support for mutating kotlin bytecode [INFO] Found shared classpath plugin : Default mutation engine [INFO] Found shared classpath plugin : JUnit 5 test framework support [INFO] Found shared classpath plugin : JUnit plugin [INFO] Available mutators : EXPERIMENTAL_ARGUMENT_PROPAGATION,FALSE_RETURNS,TRUE_RETURNS,CONDITIONALS_BOUNDARY,CONSTRUCTOR_CALLS,EMPTY_RETURNS,INCREMENTS,INLINE_CONSTS,INVERT_NEGS,MATH,NEGATE_CONDITIONALS,NON_VOID_METHOD_CALLS,NULL_RETURNS,PRIMITIVE_RETURNS,REMOVE_CONDITIONALS_EQUAL_IF,REMOVE_CONDITIONALS_EQUAL_ELSE,REMOVE_CONDITIONALS_ORDER_IF,REMOVE_CONDITIONALS_ORDER_ELSE,RETURN_VALS,VOID_METHOD_CALLS,EXPERIMENTAL_BIG_DECIMAL,EXPERIMENTAL_BIG_INTEGER,EXPERIMENTAL_MEMBER_VARIABLE,EXPERIMENTAL_NAKED_RECEIVER,REMOVE_INCREMENTS,EXPERIMENTAL_RETURN_VALUES_MUTATOR,EXPERIMENTAL_SWITCH,EXPERIMENTAL_BIG_DECIMAL,EXPERIMENTAL_BIG_INTEGER [INFO] Adding org.pitest:pitest-junit5-plugin to SUT classpath [INFO] Adding org.pitest:pitest to SUT classpath [INFO] Mutating from /SECS/home/m/moradimoghadam/PIT/money-transfer/target/classes [INFO] Defaulting target classes to match packages in build directory [INFO] Defaulting target tests to match packages in test build directory [INFO] Will read and write history at /tmp/io.kiamesdavies.revolut.money-transfer.1.0_pitest_history.bin 8:37:21 AM PIT >> INFO : Verbose logging is disabled. If you encounter a problem, please enable it before reporting an issue. 8:37:21 AM PIT >> INFO : Incremental analysis reduced number of mutations by 0 8:37:21 AM PIT >> INFO : Created 15 mutation test units in pre scan 8:37:22 AM PIT >> INFO : Sending 11 test classes to minion 8:37:22 AM PIT >> INFO : Sent tests to minion 8:37:22 AM PIT >> SEVERE : Coverage generator Minion exited abnormally due to UNKNOWN_ERROR [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 3.581 s [INFO] Finished at: 2022-12-16T08:37:22Z [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.pitest:pitest-maven:1.9.0:mutationCoverage (default-cli) on project money-transfer: 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 : Java HotSpot(TM) 64-Bit Server VM [ERROR] Vendor : Oracle Corporation [ERROR] Version : 17.0.3+8-LTS-111 [ERROR] Uptime : 4362 [ERROR] Input -> [ERROR] 1 : -Dclassworlds.conf=/opt/maven/bin/m2.conf [ERROR] 2 : -Dmaven.home=/opt/maven [ERROR] 3 : -Dlibrary.jansi.path=/opt/maven/lib/jansi-native [ERROR] 4 : -Dmaven.multiModuleProjectDirectory=/SECS/home/m/moradimoghadam/PIT/money-transfer [ERROR] BootClassPathSupported : false [ERROR] [ERROR] [ERROR] Please copy and paste the information and the complete stacktrace below when reporting an issue [ERROR] VM : Java HotSpot(TM) 64-Bit Server VM [ERROR] Vendor : Oracle Corporation [ERROR] Version : 17.0.3+8-LTS-111 [ERROR] Uptime : 4363 [ERROR] Input -> [ERROR] 1 : -Dclassworlds.conf=/opt/maven/bin/m2.conf [ERROR] 2 : -Dmaven.home=/opt/maven [ERROR] 3 : -Dlibrary.jansi.path=/opt/maven/lib/jansi-native [ERROR] 4 : -Dmaven.multiModuleProjectDirectory=/SECS/home/m/moradimoghadam/PIT/money-transfer [ERROR] BootClassPathSupported : false

hcoles commented 1 year ago

Is the plugin version you are using compatible with the version of junit platform you are using?

From the readme

1.1.0 requires pitest 1.9.0 or above and JUnit Platform 1.9.x (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

What extra information was outputted when you enabled verbose logging?

mohimoradi commented 1 year ago

Thank you for your quick response.

The junit version for that project is 5.5.0 and I use the default config.

org.pitest pitest-maven 1.9.0 org.pitest pitest-junit5-plugin 1.0.0

extra info:

[INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 3.714 s [INFO] Finished at: 2022-12-16T08:59:42Z [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.pitest:pitest-maven:1.9.0:mutationCoverage (default-cli) on project money-transfer: 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 : Java HotSpot(TM) 64-Bit Server VM [ERROR] Vendor : Oracle Corporation [ERROR] Version : 17.0.3+8-LTS-111 [ERROR] Uptime : 4497 [ERROR] Input -> [ERROR] 1 : -Dclassworlds.conf=/opt/maven/bin/m2.conf [ERROR] 2 : -Dmaven.home=/opt/maven [ERROR] 3 : -Dlibrary.jansi.path=/opt/maven/lib/jansi-native [ERROR] 4 : -Dmaven.multiModuleProjectDirectory=/SECS/home/m/moradimoghadam/PIT/money-transfer [ERROR] BootClassPathSupported : false [ERROR] [ERROR] [ERROR] Please copy and paste the information and the complete stacktrace below when reporting an issue [ERROR] VM : Java HotSpot(TM) 64-Bit Server VM [ERROR] Vendor : Oracle Corporation [ERROR] Version : 17.0.3+8-LTS-111 [ERROR] Uptime : 4498 [ERROR] Input -> [ERROR] 1 : -Dclassworlds.conf=/opt/maven/bin/m2.conf [ERROR] 2 : -Dmaven.home=/opt/maven [ERROR] 3 : -Dlibrary.jansi.path=/opt/maven/lib/jansi-native [ERROR] 4 : -Dmaven.multiModuleProjectDirectory=/SECS/home/m/moradimoghadam/PIT/money-transfer [ERROR] BootClassPathSupported : false [ERROR] [ERROR] -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.pitest:pitest-maven:1.9.0:mutationCoverage (default-cli) on project money-transfer: Execution default-cli of goal org.pitest:pitest-maven:1.9.0:mutationCoverage failed: Coverage generation minion exited abnormally!

Please copy and paste the information and the complete stacktrace below when reporting an issue VM : Java HotSpot(TM) 64-Bit Server VM Vendor : Oracle Corporation Version : 17.0.3+8-LTS-111 Uptime : 4497 Input -> 1 : -Dclassworlds.conf=/opt/maven/bin/m2.conf 2 : -Dmaven.home=/opt/maven 3 : -Dlibrary.jansi.path=/opt/maven/lib/jansi-native 4 : -Dmaven.multiModuleProjectDirectory=/SECS/home/m/moradimoghadam/PIT/money-transfer BootClassPathSupported : false

Please copy and paste the information and the complete stacktrace below when reporting an issue VM : Java HotSpot(TM) 64-Bit Server VM Vendor : Oracle Corporation Version : 17.0.3+8-LTS-111 Uptime : 4498 Input -> 1 : -Dclassworlds.conf=/opt/maven/bin/m2.conf 2 : -Dmaven.home=/opt/maven 3 : -Dlibrary.jansi.path=/opt/maven/lib/jansi-native 4 : -Dmaven.multiModuleProjectDirectory=/SECS/home/m/moradimoghadam/PIT/money-transfer 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:77)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:568)
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.9.0:mutationCoverage failed: Coverage generation minion exited abnormally!

Please copy and paste the information and the complete stacktrace below when reporting an issue VM : Java HotSpot(TM) 64-Bit Server VM Vendor : Oracle Corporation Version : 17.0.3+8-LTS-111 Uptime : 4497 Input -> 1 : -Dclassworlds.conf=/opt/maven/bin/m2.conf 2 : -Dmaven.home=/opt/maven 3 : -Dlibrary.jansi.path=/opt/maven/lib/jansi-native 4 : -Dmaven.multiModuleProjectDirectory=/SECS/home/m/moradimoghadam/PIT/money-transfer BootClassPathSupported : false

Please copy and paste the information and the complete stacktrace below when reporting an issue VM : Java HotSpot(TM) 64-Bit Server VM Vendor : Oracle Corporation Version : 17.0.3+8-LTS-111 Uptime : 4498 Input -> 1 : -Dclassworlds.conf=/opt/maven/bin/m2.conf 2 : -Dmaven.home=/opt/maven 3 : -Dlibrary.jansi.path=/opt/maven/lib/jansi-native 4 : -Dmaven.multiModuleProjectDirectory=/SECS/home/m/moradimoghadam/PIT/money-transfer 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:77)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:568)
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 : Java HotSpot(TM) 64-Bit Server VM Vendor : Oracle Corporation Version : 17.0.3+8-LTS-111 Uptime : 4497 Input -> 1 : -Dclassworlds.conf=/opt/maven/bin/m2.conf 2 : -Dmaven.home=/opt/maven 3 : -Dlibrary.jansi.path=/opt/maven/lib/jansi-native 4 : -Dmaven.multiModuleProjectDirectory=/SECS/home/m/moradimoghadam/PIT/money-transfer BootClassPathSupported : false

Please copy and paste the information and the complete stacktrace below when reporting an issue VM : Java HotSpot(TM) 64-Bit Server VM Vendor : Oracle Corporation Version : 17.0.3+8-LTS-111 Uptime : 4498 Input -> 1 : -Dclassworlds.conf=/opt/maven/bin/m2.conf 2 : -Dmaven.home=/opt/maven 3 : -Dlibrary.jansi.path=/opt/maven/lib/jansi-native 4 : -Dmaven.multiModuleProjectDirectory=/SECS/home/m/moradimoghadam/PIT/money-transfer 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:148)
at org.pitest.mutationtest.tooling.MutationCoverage.runReport (MutationCoverage.java:138)
at org.pitest.mutationtest.tooling.EntryPoint.execute (EntryPoint.java:124)
at org.pitest.mutationtest.tooling.EntryPoint.execute (EntryPoint.java:54)
at org.pitest.maven.RunPitStrategy.execute (RunPitStrategy.java:35)
at org.pitest.maven.AbstractPitMojo.analyse (AbstractPitMojo.java:504)
at org.pitest.maven.AbstractPitMojo.execute (AbstractPitMojo.java:434)
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:77)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:568)
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 : Java HotSpot(TM) 64-Bit Server VM Vendor : Oracle Corporation Version : 17.0.3+8-LTS-111 Uptime : 4497 Input -> 1 : -Dclassworlds.conf=/opt/maven/bin/m2.conf 2 : -Dmaven.home=/opt/maven 3 : -Dlibrary.jansi.path=/opt/maven/lib/jansi-native 4 : -Dmaven.multiModuleProjectDirectory=/SECS/home/m/moradimoghadam/PIT/money-transfer BootClassPathSupported : false

at org.pitest.coverage.execute.DefaultCoverageGenerator.gatherCoverageData (DefaultCoverageGenerator.java:148)
at org.pitest.coverage.execute.DefaultCoverageGenerator.calculateCoverage (DefaultCoverageGenerator.java:90)
at org.pitest.coverage.execute.DefaultCoverageGenerator.calculateCoverage (DefaultCoverageGenerator.java:52)
at org.pitest.mutationtest.tooling.MutationCoverage.runAnalysis (MutationCoverage.java:148)
at org.pitest.mutationtest.tooling.MutationCoverage.runReport (MutationCoverage.java:138)
at org.pitest.mutationtest.tooling.EntryPoint.execute (EntryPoint.java:124)
at org.pitest.mutationtest.tooling.EntryPoint.execute (EntryPoint.java:54)
at org.pitest.maven.RunPitStrategy.execute (RunPitStrategy.java:35)
at org.pitest.maven.AbstractPitMojo.analyse (AbstractPitMojo.java:504)
at org.pitest.maven.AbstractPitMojo.execute (AbstractPitMojo.java:434)
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:77)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:568)
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]

hcoles commented 1 year ago

1.0.0 requires pitest 1.9.0 or above and JUnit Platform 1.8.x (Jupiter 5.8.0)

What happens if you upgrade the JUnit version to match the requirements shown above?

mohimoradi commented 1 year ago

I upgraded the version to junit 5.8 and still same errors. 1.0.0 requires pitest 1.9.0 or above and JUnit Platform 1.8.x (Jupiter 5.8.0

Also I tried 1.1.0 requires pitest 1.9.0 or above and JUnit Platform 1.9.x (Jupiter 5.9.0) but still shows the same errors.

hcoles commented 1 year ago

The issue looks to be the zerocode-tdd-jupiter dependency which is pulling in an incompatible version of the junit platform.