While trying to run a PIT mutation test I get the following error:
mutationCoverage failed: All tests did not pass without mutation when calculating line coverage. Mutation testing requires a green suite.
The tests run just fine when I do a normal test build but while running the mutation tests phase they supposedly fail but no details are provided as to why. I have gone through the reasons listed on the PIT Testing FAQ but I still have no clue what could be wrong.
I tried:
What are some other things I should try? Or other ways to debug what could be going on here?
The common causes of tests failing at the coverage stage are
It sounds like you've eliminated 1 & 2. so that leaves 3 and 4.
Test order dependencies can be hard to spot. If the answer is yes to any of these you may have one.
There are probably also many other causes not listed above.
If you are confident that order dependencies are impossible in your code base, that leaves a problem with these particular tests.
It's hard to guess what this might be without some code. Can you post a simplified version of the test that still fails?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With