Breeding High-Impact Mutations
Birgit Schwarz, David Schüler, Andreas Zeller · 2011
Mutation testing was developed to measure the adequacy of a test suite by seeding artificial bugs (mutations) into a program, and checking whether the test suite detects them. An undetected mutation either indicates a insufficiency in the test suite and provides means for improvement, or it is an equivalent mutation that cannot be detected because it does not change the program's semantics. Impact metrics-that quantify the difference between a run of the original and the mutated version of a program-are one way to detectnon-equivalent mutants. In this paper we present a genetic algorithm that aims to produce a set of mutations that have a high impact, are not detected by the test suite, and at the same time are well spread all over the code. We believe that such a set is useful for improving a test suite, as a high impact of a mutation implies it caused a grave damage, which is not detected by the test suite, and that the mutation is likely to be non-equivalent. First results are promising: The number of undetected mutants in a set of evolved mutants increases from 20 to over 70 percent, the average impact of these undetected mutants grows at the same time by a factor of 5.