Mutation testing (or mutation analysis or program mutation) is used to design new software tests and evaluate the quality of existing software tests. Mutation testing involves making small changes to the program being tested. Each changed version is called a mutant. A test detects, and rejects, a mutant when the test fails because the test is able to tell that the behaviour of the mutant differs from that of the original code. Rejection is called killing the mutant. The value of a test suite is measured by the percentage of mutants that it kills. The test suite can then be improved by adding new tests designed to kill additional mutants.
Mutant creation is done using well-defined mutation operators that either mimic typical programming errors (such as using the wrong operator or variable name) or force the creation of valuable tests (such as dividing each expression by zero).