The term mutation in software testing stand for modifying the test code and can check the existing test and detect or reject the change mutes. Mutation in Java is an additional class with a single modification compared to the original code, for example it can be the change of a logical operator in a if section :
if
( a && b ) {...} =>
if
( a || b ) {...}
When detecting or rejecting a modification by the existing test in marked as killing a mutant. If we have a perfect test code no class mutant can survive. Testing with mutant testing can be very expensive so that is one reason why is better to write a perfect code. There are tools to create mutants and run all the tests against each of the mutants automatically. The mutation creation is based on mutation operators that are which can show typical programming errors.
This picture shows a report which list all the mutant killed by ruing the mutation testing.
Here are some of the benefits when we apply the mutation testing:
Can show all new errors to the developerCan detect hidden defects in the structure of code
Can increase customer satisfaction index because the product can be less buggy.
Maintaining and debugging the product can be easier.
Mutation testing is very useful way to find errors and fix them and it can speedup the proses of finding bugs in the code.
Citation
http://www.codeaffine.com/2015/10/05/what-the-heck-is-mutation-testing/
No comments:
Post a Comment