What is mutation testing? - Definition from WhatIs.com https://searchitoperations.techtarget.com/definition/mutation-testing?s...
Privacy Notice ×
TechTarget and its partners employ technology such as cookies to improve user experience, performance, for personalizing content and advertising. For more information, see our Cookie Policy or to OK
manage your preferences, click here. By closing this message box or continuing to use our site, you agree to our use of cookies and our Privacy Policy.
SearchITOperations
Home > App Rollout > Software development > mutation testing
DEFINITION
mutation testing
Posted by: Margaret Rouse WhatIs.com
Contributor(s): Alex Gillis
Mutation testing, also known as code mutation testing, is a form of white box testing in which testers change specific components of an application's source
code to ensure a software test suite will be able to detect the changes. Changes introduced to the software are intended to cause errors in the program.
Mutation testing is directed to ensure the quality of a software testing suite, not the applications the suite will go on to test.
Mutation testing is typically used to conduct unit tests. The goal is for the software test to be able to detect all
mutated code. Changes (called mutations) can be implemented by making modifications to an existing line of
code to a different value. For example, a statement could be deleted or duplicated, true or false expressions
can be changed or other variables can be altered.
Mutations introduced to a program’s code will typically be small and contain one variable which causes a
fault or bug. Multiple versions of the original program are then made, each with its own mutation, called
mutants. The mutants are then tested, along with the original application. Once the tests are conducted,
testers should then compare the results to the original program test.
If the tests with the mutants detect the same amount of issues as the test with the original program, then testers will know that either the code has failed to
execute, or the software testing suite being used has failed to detect the mutations. The software testing suite should then be worked on to be more
effective. The mutants can be kept and re-used in another code mutation test once the testing software has been worked on. If the test results from the
mutants to the original programs are different, with the software test detecting the faults in the mutants, then the mutants can be discarded, or killed.
The software test suite can then be scored by using the mutation score. The mutation score is the percentage of killed mutants divided by the total number of
mutants multiplied by 100.
Advantages & disadvantages
Advantages to code mutation include:
The ability to ensure the identification of weak tests or code.
Has a high level of error detection.
The increased use of object-oriented frameworks and unit tests have brought about more mutation testing tools.
Mutation scores can give organizations an idea of how useful their testing suite is.
Disadvantages to code mutation include:
The large number of mutants used to test a test suite can lead to a potentially confusing experience in testing each version, which may reduce mutation
testing’s practicality without automation.
Because of the large number of mutants being tested, mutation testing can be time-consuming and pricey.
Mutation testing vs. regression testing
Regression testing can be easily confused with mutation testing at first glance. Regression testing is the process of testing new changes to a program to
ensure that the older programming still works with new changes. Test department coders will develop code test scenarios that will test new units of code after
being written.
Regression testing is used to test changes to a program to ensure a new version of an application which solves an old bug does not introduce another.
Regression tests will look at applications to ensure that small changes to an application's code do not break the software. This is opposed to code mutation,
which makes new changes to an application's code to test the test suite itself.
Prev
Next
1 of 4 10/04/2019, 00:55
What is mutation testing? - Definition from WhatIs.com https://searchitoperations.techtarget.com/definition/mutation-testing?s...
Margaret Rouse asks:
Does your organization use mutation testing?
Join the Discussion
This was last updated in March 2019
Continue Reading About mutation testing
Should black-box, white-box testing be used together?
Tests Coverage is Dead — Long Live Mutation Testing
Is unit testing an important aspect of software development?
How to learn white box testing
Agile 2013: Scientists reveal software testing trends
Related Terms
continuous delivery (CD)
Continuous delivery (CD) is a software release approach in which development teams produce and test code in short cycles, usually... See complete definition
DevOps
In its most broad meaning, DevOps is an operational philosophy that promotes better communication between development and ... See complete definition
serverless computing
Serverless computing is an event-driven application design and deployment paradigm in which computing resources are provided as ... See complete definition
Dig Deeper on Application Rollout Planning and Problems
AL L NE W S GE T S TAR T E D E VAL UAT E MANAGE P R O B LE M S O LVE
Bolster enterprise application support from dev to Release automation tools link legacy, modern app
deployment management
Steps to safely build and manage a preproduction Open source in the enterprise presents a two-edged
environment sword
Load More
2 of 4 10/04/2019, 00:55
What is mutation testing? - Definition from WhatIs.com https://searchitoperations.techtarget.com/definition/mutation-testing?s...
Join the conversation 1 comment
Share your comment
Send me notifications when other members comment.
Add My Comment
Oldest
[-] Margaret Rouse - 15 Mar 2019 9:07 AM
Does your organization use mutation testing?
Reply
-ADS BY GOOGLE
SearchDataCenter
Latest TechTarget
resources
4 considerations for choosing a private cloud provider
DATA CENTER
AWS
3 of 4 10/04/2019, 00:55
What is mutation testing? - Definition from WhatIs.com https://searchitoperations.techtarget.com/definition/mutation-testing?s...
Key features to look for from a private cloud provider include interoperability, scalability and
SERVER VIRTUALIZATION how familiar admins are with the...
CLOUD APPLICATIONS
Intel Xeon Scalable launch prompts server upgrades
JAVA
CLOUD COMPUTING
DEVOPSAGENDA
Dell and Super Micro timed server upgrades to this week's launch of next-generation Intel
Xeon Scalable processors, based on the ...
About Us Contributors Features
Meet The Editors Reprints Guides
Contact Us Archive Opinions
Privacy Policy Site Map Photo Stories
Advertisers Answers Quizzes
Business Partners Definitions Tips
Media Kit E-Products Tutorials
Corporate Site Events Videos
All Rights Reserved, Copyright 2016 - 2019, TechTarget
4 of 4 10/04/2019, 00:55