Efficient Mutation Testing using Whole Test Suite Generation

By seeding artificial faults (mutants), mutation testing can tell us how good existing tests are, and it can help to direct test generation efforts. However, mutation based test generation is hampered because there usually are simply too many mutants, and too many of these mutants are either trivially killed or equivalent. Any effort spent on test generation for equivalent mutants is per definition wasted, and misdirects resources from where they could be put to better use – for example to produce tests revealing more non-equivalent mutants. To overcome this problem, our search-based EVOSUITE test generation tool integrates two optimizations: First, we avoid redundant test executions on mutants by monitoring state infection conditions, and second we use whole test suite generation to optimize test suites towards killing the highest number of mutants, rather than selecting individual mutants. These optimizations allowed us to perform one of the largest empirical studies on mutation testing to date, where we applied EVOSUITE to a random sample of 100 open source projects consisting of a total of 8,963 classes, leading to a total of 1,380,302 mutants. The experiment not only demonstrates that our approach scales well, but it also quantifies the relations between weak and strong mutation testing as well as branch coverage, and points out current limitations. Keywords-mutation testing; test case generation; searchbased testing; testing classes; unit testing

[1]  Gordon Fraser,et al.  Whole Test Suite Generation , 2013, IEEE Transactions on Software Engineering.

[2]  René Just,et al.  Using Non-redundant Mutation Operators and Test Suite Prioritization to Achieve Efficient and Scalable Mutation Analysis , 2012, 2012 IEEE 23rd International Symposium on Software Reliability Engineering.

[3]  Gordon Fraser,et al.  Sound empirical evidence in software testing , 2012, 2012 34th International Conference on Software Engineering (ICSE).

[4]  Mark Harman,et al.  Strong higher order mutation-based test data generation , 2011, ESEC/FSE '11.

[5]  Lionel C. Briand,et al.  A practical guide for using statistical tests to assess randomized algorithms in software engineering , 2011, 2011 33rd International Conference on Software Engineering (ICSE).

[6]  Mike Papadakis,et al.  Automatic Mutation Test Case Generation via Dynamic Symbolic Execution , 2010, 2010 IEEE 21st International Symposium on Software Reliability Engineering.

[7]  Nikolai Tillmann,et al.  Test generation via Dynamic Symbolic Execution for mutation testing , 2010, 2010 IEEE International Conference on Software Maintenance.

[8]  Andreas Zeller,et al.  Mutation-Driven Generation of Unit Tests and Oracles , 2010, IEEE Transactions on Software Engineering.

[9]  Andreas Zeller,et al.  (Un-)Covering Equivalent Mutants , 2010, 2010 Third International Conference on Software Testing, Verification and Validation.

[10]  Mark Harman,et al.  Higher Order Mutation Testing , 2009, Inf. Softw. Technol..

[11]  Giuliano Antoniol,et al.  Automatic mutation test input data generation via ant colony , 2007, GECCO '07.

[12]  J.H. Andrews,et al.  Is mutation an appropriate tool for testing experiments? [software testing] , 2005, Proceedings. 27th International Conference on Software Engineering, 2005. ICSE 2005..

[13]  A. Jefferson Offutt,et al.  An experimental mutation system for Java , 2004, SOEN.

[14]  Mark Harman,et al.  How to Overcome the Equivalent Mutant Problem and Achieve Tailored Selective Mutation Using Co-evolution , 2004, GECCO.

[15]  Phil McMinn Search‐based software test data generation: a survey , 2004, Softw. Test. Verification Reliab..

[16]  M. Harman,et al.  Using program slicing to assist in the detection of equivalent mutants , 1999, Softw. Test. Verification Reliab..

[17]  Phyllis G. Frankl,et al.  All-uses vs mutation testing: An experimental comparison of effectiveness , 1997, J. Syst. Softw..

[18]  A. Jefferson Offutt,et al.  Automatically detecting equivalent mutants and infeasible paths , 1997, Softw. Test. Verification Reliab..

[19]  W. Eric Wong,et al.  Mutation Versus All-uses: An Empirical Evaluation of Cost, Strength and Effectiveness , 1994, Software Quality and Productivity.

[20]  A. Jefferson Offutt,et al.  An Empirical Evaluation of Weak Mutation , 1994, IEEE Trans. Software Eng..

[21]  Roland H. Untch,et al.  Mutation-based software testing using program schemata , 1992, ACM Southeast Regional Conference.

[22]  A. Jefferson Offutt,et al.  Investigations of the software testing coupling effect , 1992, TSEM.

[23]  A. Jefferson Offutt,et al.  How strong is weak mutation? , 1991, TAV4.

[24]  A. Jefferson Offutt,et al.  Constraint-Based Automatic Test Data Generation , 1991, IEEE Trans. Software Eng..

[25]  Bogdan Korel,et al.  Automated Software Test Data Generation , 1990, IEEE Trans. Software Eng..

[26]  William E. Howden,et al.  Weak Mutation Testing and Completeness of Test Sets , 1982, IEEE Transactions on Software Engineering.

[27]  Douglas Baldwin,et al.  Heuristics for Determining Equivalence of Program Mutations. , 1979 .

[28]  Erich Bloch,et al.  Hints on Test Data Selection: Help for the Practicing Programmer , 1978, Computer.

[29]  Richard G. Hamlet,et al.  Testing Programs with the Aid of a Compiler , 1977, IEEE Transactions on Software Engineering.

[30]  Leonardo Bottaci,et al.  A Genetic Algorithm Fitness Function for Mutation Testing , 2001 .

[31]  A. Jefferson Offutt,et al.  Using compiler optimization techniques to detect equivalent mutants , 1994, Softw. Test. Verification Reliab..

[32]  Patrick Joseph Walsh,et al.  A measure of test case completeness (software, engineering) , 1985 .

[33]  M. Harman,et al.  Ieee Transactions on Software Engineering an Analysis and Survey of the Development of Mutation Testing , 2022 .