Laura Inozemtseva

Are Mutants a Valid Substitute for Real Faults in Software Testing?

René Just, Darioush Jalali, Laura Inozemtseva, Michael D. Ernst, Reid Holmes and Gordon Fraser

Distinguished paper at FSE 2014

"This is a very strong paper. It's probably the best in the pile I had to review (first round) and I would like to recommend it for a distinguished paper award. I would also champion its acceptance at FSE 2014." --Reviewer 1

"This is by far the most extensive study of this kind and especially the types of things that cannot be caught is quite interesting from a research point of view." --Reviewer 2

"The work is significant and investigates a fundamental issue in mutation testing. [...] The paper contains a rich set of data produced by a believable and rigorous experiment."
--Reviewer 3

Abstract

A good test suite is one that detects real faults. Because the set of faults in a program is usually unknowable, this definition is not useful to practitioners who are creating test suites, nor to researchers who are creating and evaluating tools that generate test suites. In place of real faults, testing research often uses mutants, which are artificial faults -- each one a simple syntactic variation -- that are systematically seeded throughout the program under test. Mutation analysis is appealing because large numbers of mutants can be automatically-generated and used to compensate for low quantities or the absence of known real faults.

Unfortunately, there is little experimental evidence to support the use of mutants as a replacement for real faults. This paper investigates whether mutants are indeed a valid substitute for real faults, i.e., whether a test suite's ability to detect mutants is correlated with its ability to detect real faults that developers have fixed. Unlike prior studies, these investigations also explicitly consider the conflating effects of code coverage on the mutant detection rate.

Our experiments used 357 real faults in 5 open-source applications that comprise a total of 321,000 lines of code. Furthermore, our experiments used both developer-written and automatically-generated test suites. The results show a statistically significant correlation between mutant detection and real fault detection, independently of code coverage. The results also give concrete suggestions on how to improve mutation analysis and reveal some inherent limitations.

Supplementary Material

PDF of the paper

DOI

Slides from the talk

Defects4J

The Major mutation tool

BibTeX

@inproceedings{JJI+14,
    author={Just, Ren\'{e} and Jalali, Darioush and Inozemtseva, Laura and Ernst, Michael D. and Holmes, Reid and Fraser, Gordon},
    title={Are Mutants a Valid Substitute for Real Faults in Software Testing?},
    booktitle={Proceedings of the Symposium on the Foundations of Software Engineering},
    year={2014},
}