Mutation Testing - Equivalent Mutants

Equivalent Mutants

Many mutation operators can produce equivalent mutants. For example, consider the following code fragment:

int index = 0; while (…) { …; index++; if (index == 10) { break; } }

Boolean relation mutation operator will replace == with >= and produce the following mutant:

int index = 0; while (…) { …; index++; if (index >= 10) { break; } }

However, it is not possible to find a test case that could kill this mutant. The resulting program is equivalent to the original one. Such mutants are called equivalent mutants.

Equivalent mutants detection is one of biggest obstacles for practical usage of mutation testing. The effort needed to check if mutants are equivalent or not, can be very high even for small programs.

Read more about this topic:  Mutation Testing

Famous quotes containing the word equivalent:

    But then people don’t read literature in order to understand; they read it because they want to re-live the feelings and sensations which they found exciting in the past. Art can be a lot of things; but in actual practice, most of it is merely the mental equivalent of alcohol and cantharides.
    Aldous Huxley (1894–1963)