On generating mutants for AspectJ programs

Context: Mutation analysis has been widely used in research studies to evaluate the effectiveness of test suites and testing techniques. Faulty versions (i.e., mutants) of a program are generated such that each mutant contains one seeded fault. The mutation score provides a measure of effectiveness. Objective: We study three problems with the use of mutation analysis for testing AspectJ programs:*The manual identification and removal of equivalent mutants is difficult and time consuming. We calculate the percentage of equivalent mutants generated for benchmark AspectJ programs using available mutation tools. *The generated mutants need to cover the various fault types described in the literature on fault models for AspectJ programs. We measure the distribution of the mutants generated using available mutation tools with respect to the AspectJ fault types. *We measure the difficulty of killing the generated mutants. We propose the use of simple analysis of the subject programs to prevent the generation of some equivalent mutants. Method: We revised existing AspectJ fault models and presented a fault model that removes the problems in existing fault models, such as overlapping between fault types and missing fault types. We also defined three new fault types that occur due to incorrect data-flow interactions occurring in AspectJ programs. We used three mutation tools: AjMutator, Proteum/AJ, and MuJava on three AspectJ programs. To measure the difficulty of killing the mutants created using a mutation operator, we compared the average number of the mutants killed by 10 test suites that satisfy block coverage criterion. Results: A high percentage of the mutants are equivalent. The mutation tools do not cover all the fault types. Only 4 out of 27 operators generated mutants that were easy to kill. Conclusions: Our analysis approach removed about 80% of the equivalent mutants. Higher order mutation is needed to cover all the fault types.

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

[2]  Fabiano Cutigi Ferrari,et al.  Automating the mutation testing of aspect-oriented Java programs , 2010, AST '10.

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

[4]  Sudipto Ghosh,et al.  A Dataflow Testing Approach for Aspect-Oriented Programs , 2010, 2010 IEEE 12th International Symposium on High Assurance Systems Engineering.

[5]  Lech Madeyski,et al.  Judy - a mutation testing tool for Java , 2010, IET Softw..

[6]  Dana Angluin,et al.  Two notions of correctness and their relation to testing , 1982, Acta Informatica.

[7]  Arie van Deursen,et al.  A Systematic Aspect-Oriented Refactoring and Testing Strategy, and its Application to JHotDraw , 2005, ArXiv.

[8]  Jianjun Zhao,et al.  On Identifying Bug Patterns in Aspect-Oriented Programs , 2007, 31st Annual International Computer Software and Applications Conference (COMPSAC 2007).

[9]  Shari Lawrence Pfleeger,et al.  Software metrics (2nd ed.): a rigorous and practical approach , 1997 .

[10]  Auri Marcelo Rizzo Vincenzi,et al.  Toward the determination of sufficient mutant operators for C † , 2001, Softw. Test. Verification Reliab..

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

[12]  Howard B. Lee,et al.  Foundations of Behavioral Research , 1973 .

[13]  Cristina V. Lopes,et al.  Testing aspect-oriented programming Pointcut Descriptors , 2006, WTAOP '06.

[14]  Egon Berghout,et al.  The Goal/Question/Metric method: a practical guide for quality improvement of software development , 1999 .

[15]  Roger T. Alexander,et al.  A Candidate Fault Model for AspectJ Pointcuts , 2006, 2006 17th International Symposium on Software Reliability Engineering.

[16]  Akbar Siami Namin,et al.  Sufficient mutation operators for measuring test effectiveness , 2008, 2008 ACM/IEEE 30th International Conference on Software Engineering.

[17]  James M. Bieman,et al.  Towards the Systematic Testing of Aspect-Oriented Programs , 2004 .

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

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

[20]  Dianxiang Xu,et al.  Automated Test Code Generation from Class State Models , 2009, Int. J. Softw. Eng. Knowl. Eng..

[21]  Yves Le Traon,et al.  AjMutator: A Tool for the Mutation Analysis of AspectJ Pointcut Descriptors , 2009, 2009 International Conference on Software Testing, Verification, and Validation Workshops.

[22]  Fabiano Cutigi Ferrari,et al.  Mutation Testing for Aspect-Oriented Programs , 2008, 2008 1st International Conference on Software Testing, Verification, and Validation.

[23]  Mark Harman,et al.  Constructing Subtle Faults Using Higher Order Mutation Testing , 2008, 2008 Eighth IEEE International Working Conference on Source Code Analysis and Manipulation.

[24]  W. Eric Wong,et al.  Reducing the cost of mutation testing: An empirical study , 1995, J. Syst. Softw..

[25]  Mark Harman,et al.  The relationship between program dependence and mutation analysis , 2001 .

[26]  Victor R. Basili,et al.  A Methodology for Collecting Valid Software Engineering Data , 1984, IEEE Transactions on Software Engineering.

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

[28]  A. Jefferson Offutt,et al.  Automatically detecting equivalent mutants and infeasible paths , 1997 .

[29]  A. Jefferson Offutt,et al.  MuJava: an automated class mutation system , 2005, Softw. Test. Verification Reliab..

[30]  Gary McGraw,et al.  Software fault injection: inoculating programs against errors , 1997 .

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

[32]  Michael D. Ernst,et al.  Feedback-Directed Random Test Generation , 2007, 29th International Conference on Software Engineering (ICSE'07).

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

[34]  Shari Lawrence Pfleeger,et al.  Software Metrics : A Rigorous and Practical Approach , 1998 .