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:

    The notion that one will not survive a particular catastrophe is, in general terms, a comfort since it is equivalent to abolishing the catastrophe.
    Iris Murdoch (b. 1919)