On guiding the augmentation of an automated test suite via mutation analysis

Mutation testing has traditionally been used as a defect injection technique to assess the effectiveness of a test suite as represented by a “mutation score.” Recently, mutation testing tools have become more efficient, and industrial usage of mutation analysis is experiencing growth. Mutation analysis entails adding or modifying test cases until the test suite is sufficient to detect as many mutants as possible and the mutation score is satisfactory. The augmented test suite resulting from mutation analysis may reveal latent faults and provides a stronger test suite to detect future errors which might be injected. Software engineers often look for guidance on how to augment their test suite using information provided by line and/or branch coverage tools. As the use of mutation analysis grows, software engineers will want to know how the emerging technique compares with and/or complements coverage analysis for guiding the augmentation of an automated test suite. Additionally, software engineers can benefit from an enhanced understanding of efficient mutation analysis techniques. To address these needs for additional information about mutation analysis, we conducted an empirical study of the use of mutation analysis on two open source projects. Our results indicate that a focused effort on increasing mutation score leads to a corresponding increase in line and branch coverage to the point that line coverage, branch coverage and mutation score reach a maximum but leave some types of code structures uncovered. Mutation analysis guides the creation of additional “common programmer error” tests beyond those written to increase line and branch coverage. We also found that 74% of our chosen set of mutation operators is useful, on average, for producing new tests. The remaining 26% of mutation operators did not produce new test cases because their mutants were immediately detected by the initial test suite, indirectly detected by test suites we added to detect other mutants, or were not able to be detected by any test.

[1]  Keith W. Miller,et al.  Using fault injection to assess software engineering standards , 1995, Proceedings of Software Engineering Standards Symposium.

[2]  Lionel C. Briand,et al.  Using Mutation Analysis for Assessing and Comparing Testing Coverage Criteria , 2006, IEEE Transactions on Software Engineering.

[3]  J.H. Andrews,et al.  Finding Sufficient Mutation Operators via Variable Reduction , 2006, Second Workshop on Mutation Analysis (Mutation 2006 - ISSRE Workshops 2006).

[4]  Richard J. Lipton,et al.  Hints on Test Data Selection: Help for the Practicing Programmer , 1978, Computer.

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

[6]  A. Jefferson Offutt,et al.  The class-level mutants of MuJava , 2006, AST '06.

[7]  David Hovemeyer,et al.  Finding bugs is easy , 2004, SIGP.

[8]  A. Jefferson Offutt,et al.  An Experimental Evaluation of Data Flow and Mutation Testing , 1996, Softw. Pract. Exp..

[9]  B.H. Smith,et al.  An Empirical Evaluation of the MuJava Mutation Operators , 2007, Testing: Academic and Industrial Conference Practice and Research Techniques - MUTATION (TAICPART-MUTATION 2007).

[10]  Lionel C. Briand,et al.  Is mutation an appropriate tool for testing experiments? , 2005, ICSE.

[11]  R.A. DeMillo,et al.  An extended overview of the Mothra software testing environment , 1988, [1988] Proceedings. Second Workshop on Software Testing, Verification, and Analysis.

[12]  Ralph Johnson,et al.  design patterns elements of reusable object oriented software , 2019 .

[13]  Karl Reed,et al.  On the effectiveness of mutation analysis as a black box testing technique , 2001, Proceedings 2001 Australian Software Engineering Conference.

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

[15]  Hong Zhu,et al.  Software unit test coverage and adequacy , 1997, ACM Comput. Surv..

[16]  Gregg Rothermel,et al.  An experimental determination of sufficient mutant operators , 1996, TSEM.

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

[18]  James M. Bieman,et al.  Mutation of Java objects , 2002, 13th International Symposium on Software Reliability Engineering, 2002. Proceedings..

[19]  Yong Rae Kwon,et al.  Evaluation of mutation testing for object-oriented programs , 2006, ICSE.

[20]  Aditya P. Mathur,et al.  On predicting reliability of modules using code coverage , 1996, CASCON.

[21]  S. Inglis,et al.  Jumble Java Byte Code to Measure the Effectiveness of Unit Tests , 2007, Testing: Academic and Industrial Conference Practice and Research Techniques - MUTATION (TAICPART-MUTATION 2007).