-
Notifications
You must be signed in to change notification settings - Fork 353
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
PitError: Coverage generation minion exited abnormally! #537
Comments
Hi, I am running into same error, Any pointers |
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! Please copy and paste the information and the complete stacktrace below when reporting an issue Please copy and paste the information and the complete stacktrace below when reporting an issue
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 Please copy and paste the information and the complete stacktrace below when reporting an issue
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 Please copy and paste the information and the complete stacktrace below when reporting an issue
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
[ERROR] |
The problem seems to be twofold:
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:
(just some prototyping) However, using this code results in test errors: Failed tests: 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. Thanks in advance! |
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. |
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. |
Please have a look at michielgkalkman/PmdPlus@fd84044
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
The text was updated successfully, but these errors were encountered: