Advantages and Disadvantages of Mutation Testing
by Nataliia Vasylyna | August 12, 2015 12:03 pm
Note: the article was updated in May 2020.
Pros and Cons of Mutation Testing
Mutation testing stands along with classic testing types, for instance, mobile testing[1], web application testing[2], or desktop testing[3]. This type of testing is also called fault-based testing. It is performed through generating the insignificantly damaged versions of a program under development. This method has its pros and cons, let’s find out more about them.
What is Mutation Testing: Simple Definition
In a nutshell, the word “mutation“ means changing the structure. Hence, such kind of software product testing involves modifying the source code or penetration of the minor bugs mutants. The inserted errors are too small the basic objectives of the program to be affected. After that, the target program and mutant programs are equally tested. In case if the result is the same, the slightly changed program is missing. If there are differences in it, the defected program still exists.
The process itself involves several parts:
- Modified software creating — introducing many versions called mutants
- Test cases developing
- Completing an original and damaged program
- Mutation score comparison
Mutation testing provides help in developing effective tests or in finding weak spots in the test data used for the program.
Types of Mutation Testing
There are several types of mutation testing, each of them has its own mission and usage. Value mutation includes modifying values. As practice shows, a small value and a large value are interchanged.
- Decision mutation involves changing the logical, arithmetic, and relational operators the defects to be identified.
- Statement mutation is implemented through the statements altering.
Mutation Testing Pluses:
- this method enables the entire source code coverage and detecting the parts which are not tested properly;
- it is possible to detect high-quality bugs, which are problematic to find by usual testing;
- program mutants are thoroughly tested;
- testing reveals hidden faults in the source code such as source code ambiguities in the primary stages;
- it is advantageous to customers as they get a safer and more reliable system.
Mutation Testing Minuses:
- this process is extremely expensive and time-consuming because all the mutant programs should be generated independently;
- being complicated to perform, this type of testing should be automated;
- as this method includes the source code changes, it can t be used for the black box testing[4];
- a large number of mutant programs may demand testing against the original test suite.
So, being the most adaptable and the most complete software testing method, mutation testing can be used by software testing company employees. It has an important function of maximum code coverage.
Learn more from QATestLab
Related Posts:
Endnotes:- mobile testing: http://mobile.qatestlab.com/en/
- web application testing: https://qatestlab.com/solutions/by-focus-area/web-application-testing/
- desktop testing: https://qatestlab.com/solutions/by-focus-area/desktop-applications/
- black box testing: https://qatestlab.com/resources/knowledge-center/black-box-testing/
Source URL: https://blog.qatestlab.com/2015/08/12/advantages-mutation-testing/
Copyright ©2024 QATestLab Blog unless otherwise noted.