The Community for Technology Leaders
Green Image
Issue No. 02 - March-April (2012 vol. 38)
ISSN: 0098-5589
pp: 278-292
Gordon Fraser , Saarland University, Saarbrücken
Andreas Zeller , Saarland University, Saarbrücken
ABSTRACT
To assess the quality of test suites, mutation analysis seeds artificial defects (mutations) into programs; a nondetected mutation indicates a weakness in the test suite. We present an automated approach to generate unit tests that detect these mutations for object-oriented classes. This has two advantages: First, the resulting test suite is optimized toward finding defects modeled by mutation operators rather than covering code. Second, the state change caused by mutations induces oracles that precisely detect the mutants. Evaluated on 10 open source libraries, our μtest prototype generates test suites that find significantly more seeded defects than the original manually written test suites.
INDEX TERMS
Mutation analysis, test case generation, unit testing, test oracles, assertions, search-based testing.
CITATION
Gordon Fraser, Andreas Zeller, "Mutation-Driven Generation of Unit Tests and Oracles", IEEE Transactions on Software Engineering, vol. 38, no. , pp. 278-292, March-April 2012, doi:10.1109/TSE.2011.93
89 ms
(Ver )