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.

PIT is generating equivalent mutations

See original GitHub issue

I’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:closed
  • Created 5 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
hcolescommented, Aug 7, 2018

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.

0reactions
pedrorijo91commented, Aug 8, 2018

both return true; and return Optional.empty() false positives have been fixed 😃 once again, thanks a lot for the quick iteration @hcoles

Read more comments on GitHub >

github_iconTop 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 >

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