Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 1.2.0 does not work #100

Closed
spartanhooah opened this issue Aug 1, 2023 · 7 comments
Closed

Version 1.2.0 does not work #100

spartanhooah opened this issue Aug 1, 2023 · 7 comments

Comments

@spartanhooah
Copy link

spartanhooah commented Aug 1, 2023

I cannot run pitest (using version 1.9.11 of info.solidsoft.gradle.pitest:gradle-pitest-plugin and version 1.2.0 of pitest-junit5-plugin. I get the following error:

> Task :pitest
8:40:54 AM PIT >> INFO : Verbose logging is disabled. If you encounter a problem, please enable it before reporting an issue.
8:40:55 AM PIT >> INFO : Incremental analysis reduced number of mutations by 0
8:40:55 AM PIT >> INFO : Created 1 mutation test units in pre scan
8:40:56 AM PIT >> INFO : Sending 1 test classes to minion
8:40:56 AM PIT >> INFO : Sent tests to minion
8:40:56 AM PIT >> SEVERE : Coverage generator Minion exited abnormally due to UNKNOWN_ERROR
Exception in thread "main" org.pitest.util.PitError: Coverage generation minion exited abnormally! (UNKNOWN_ERROR)

Please copy and paste the information and the complete stacktrace below when reporting an issue
VM : OpenJDK 64-Bit Server VM
Vendor : Red Hat, Inc.
Version : 17.0.7+7
Uptime : 2622
Input -> 
 1 : -Dfile.encoding=UTF-8
 2 : -Duser.country=US
 3 : -Duser.language=en
 4 : -Duser.variant
BootClassPathSupported : false


Please copy and paste the information and the complete stacktrace below when reporting an issue
VM : OpenJDK 64-Bit Server VM
Vendor : Red Hat, Inc.
Version : 17.0.7+7
Uptime : 2623
Input -> 
 1 : -Dfile.encoding=UTF-8
 2 : -Duser.country=US
 3 : -Duser.language=en
 4 : -Duser.variant
BootClassPathSupported : false

        at org.pitest.util.Unchecked.translateCheckedException(Unchecked.java:20)
        at org.pitest.coverage.execute.DefaultCoverageGenerator.calculateCoverage(DefaultCoverageGenerator.java:112)
        at org.pitest.coverage.execute.DefaultCoverageGenerator.calculateCoverage(DefaultCoverageGenerator.java:54)
        at org.pitest.mutationtest.tooling.MutationCoverage.runAnalysis(MutationCoverage.java:154)
        at org.pitest.mutationtest.tooling.MutationCoverage.runReport(MutationCoverage.java:144)
        at org.pitest.mutationtest.tooling.EntryPoint.execute(EntryPoint.java:130)
        at org.pitest.mutationtest.tooling.EntryPoint.execute(EntryPoint.java:58)
        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! (UNKNOWN_ERROR)

Please copy and paste the information and the complete stacktrace below when reporting an issue
VM : OpenJDK 64-Bit Server VM
Vendor : Red Hat, Inc.
Version : 17.0.7+7
Uptime : 2622
Input -> 
 1 : -Dfile.encoding=UTF-8
 2 : -Duser.country=US
 3 : -Duser.language=en
 4 : -Duser.variant
BootClassPathSupported : false

        at org.pitest.coverage.execute.DefaultCoverageGenerator.gatherCoverageData(DefaultCoverageGenerator.java:151)
        at org.pitest.coverage.execute.DefaultCoverageGenerator.calculateCoverage(DefaultCoverageGenerator.java:96)
        ... 7 more

I have a minimum reproducible example here. If I switch junit5PluginVersion to 1.1.2, the task runs successfully.

@hcoles
Copy link
Contributor

hcoles commented Aug 1, 2023

The example you linked to doesn't have pitest configured, but most likely the problem is that you haven't added junit platform as a dependency for pitest. See the plugin readme for details.

@spartanhooah
Copy link
Author

Yup, I forgot to push after adding and configuring pitest 🤦. You should see the configuration now.

@hcoles
Copy link
Contributor

hcoles commented Aug 1, 2023

Your configuration is missing the junit-platform-launcher depedendency. I've updated the readme, let me know if anything isn't clear.

@spartanhooah
Copy link
Author

spartanhooah commented Aug 2, 2023

Where does that dependency typically come from? It's not one I've encountered before. It also isn't in my dependencies when using 1.1.2 of pitest-junit5-plugin but that version works fine.

@spartanhooah
Copy link
Author

Any other input about this issue?

@szpak
Copy link
Contributor

szpak commented Aug 4, 2023

The Gradle plugin will provide it for you automatically in the future: szpak/gradle-pitest-plugin#337 . It was a change in the PIT itself to deal with some corner cases: hcoles/pitest#1212

@spartanhooah
Copy link
Author

Yup. Adding testRuntimeOnly "org.junit.platform:junit-platform-launcher" allowed me to run pitest using version 1.2.0 of this project. Thanks for pointing me to that issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants