PIT is generating equivalent mutations
See original GitHub issueI’ve seen a couple of SURVIVED mutants that are basically equivalent to the original code base.
I don’t have a full example yet, but I’ve seen it happen in lines whose original content is something like return true;
and it replaces by an equal mutant return true;
which obviously will survive.
Is this a known bug? is there any workaround? If I wanted to help, where should I start looking into?
Thanks, Pedro
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
Basic concepts - PIT Mutation Testing
By applying the mutation operators PIT will generate a number (potentially a very large number) of mutants. These are Java classes which contain...
Read more >An Experimental Evaluation of PIT's Mutation Operators
Mutation testing is a fault-finding software testing technique that creates mutants by injecting a syntactic change into the source.
Read more >Real world mutation testing - Cornell CS
PIT is a state of the art mutation testing system, providing gold ... PIT avoids generating this type of equivalent mutation by not...
Read more >An intro to Mutation Testing - or why coverage sucks
A intro to Mutation Testing, a technique that has become robust ... the HTML report generated at <base_dir>/target/pit-reports/<date> .
Read more >Mutation Testing - Who will test the tests themselves?
In this post I will be using PIT with Java to demonstrate the ... are not too easy to detect and unlikely to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok, that’s fixed in master, will push a release out soon.
Thanks for the report. Most users would not see this as the new mutators are not switched on by default. Please do report any other similar issues - the plan is to replace the existing return vals mutator with the new set in the near future, but as this bug demonstrates there could still be some unexpected problems.
both
return true;
andreturn Optional.empty()
false positives have been fixed 😃 once again, thanks a lot for the quick iteration @hcoles