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:

    Inter-railers are the ambulatory equivalent of McDonalds, walking testimony to the erosion of French culture.
    Alice Thompson (b. 1963)