question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

False error: Mutation testing requires a green suite

See original GitHub issue

I am running pitest against a green suite. Though specific test classes fail when run with pitest.

The failing test classes have the following annotations:

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = "/domain-test-context.xml")

This setup is being used so that we test code against a real DB.

If I am not mistaken these annotations is the reason these classes fail when being run by pitest.

Is this solveable ?

If not then is it possible to somehow configure pitest to ignore such tests ?

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:20 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
galovicscommented, Jul 8, 2016

I haven’t used rules for this purpose but if this is the trend, it can be supported as well. I like to do small steps to the goal and this is the first one (excluding by runners). Let’s see how it works and how people use it, then we can continue developing this option.

I heard about JUnit categories as well but if you have hundreds or thousands of tests, you don’t want to categorize them one-by-one; but yeah, this might be an option for other projects.

0reactions
hcolescommented, Dec 8, 2020

@StefanPenndorf I agree we should close this one. I think there may be a feature request in here to support filtering out tests that use certain junit rules, but I think that can be raised seperately if it is still something people would find useful in 2020.

Read more comments on GitHub >

github_iconTop Results From Across the Web

JUnit tests pass but PIT says the suite isn't green
mutationCoverage failed : All tests did not pass without mutation when calculating line coverage. Mutation testing requires a green suite.
Read more >
Error "Mutation testing requires a green suite" - Google Groups
1:mutationCoverage failed: All tests did not pass without mutation when calculating line coverage. Mutation testing requires a green suite. [ ...
Read more >
Mutation Testing: Automate the Search for Imperfect Tests
Mutation testing requires a green suite. This message can occur if you have a failing test.
Read more >
FAQ - PIT Mutation Testing
My tests normally run green but PIT says the suite isn't green. Most commonly this is because either : PIT is picking up...
Read more >
Hunt The Bugs With Mutation Testing - Sipios
Be careful, Pitest requires that you run the mutation testing analysis again a green tests suite so you may need to run your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found