pitest: False error: Mutation testing requires a green suite
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 ?
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 20 (11 by maintainers)
Commits related to this issue
- Merge pull request #283 from galovics/master Extension for Issue #170 — committed to hcoles/pitest by hcoles 8 years ago
- fixes a typo in excludedClasses in FAQ The parameter is named excludedClasses in OptionsParser and AbstractPitMojo as pointed out by @akhayrutdinov in https://github.com/hcoles/pitest/issues/170#iss... — committed to StefanPenndorf/pitest-site by StefanPenndorf 4 years ago
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.