Towards the practical mutation testing of AspectJ programs

Mutation testing is a test selection criterion that relies on the assumption that test cases which can reveal artificial faults in the software are also good to reveal the real ones. It helps to expose faults which would go otherwise unnoticed. This criterion has been shown to be a promising means to deal with testing-related specificities of contemporary programming techniques such as Aspect-Oriented Programming. However, to date the few initiatives for customising mutation testing for aspect-oriented (AO) programs show either limited coverage with respect to the range of simulated faults, or a need for both adequate tool support and proper evaluation in regard to properties like application cost and effectiveness. This article tackles these limitations by describing a comprehensive mutation-based testing approach for programs written in AspectJ, which represents the most investigated AO programming language to date. The approach encompasses the definition of a set of mutation operators for AspectJ-specific constructs and the implementation of a tool that automates the approach. The results of a preliminary evaluation study show that the mutation operators are able to simulate faults that may not be revealed by pre-existing, non-mutation-based test suites. The results also suggest that the approach seems not to overwhelm the testers and hence represents a step towards the practical fault-based testing of AspectJ-like programs.

[1]  Aditya P. Mathur,et al.  Interface Mutation: An Approach for Integration Testing , 2001, IEEE Trans. Software Eng..

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

[3]  Tao Xie,et al.  Automated Generation of Pointcut Mutants for Testing Pointcuts in AspectJ Programs , 2008, 2008 19th International Symposium on Software Reliability Engineering (ISSRE).

[4]  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.

[5]  Cláudio Sant'Anna,et al.  On the Impact of Aspectual Decompositions on Design Stability: An Empirical Study , 2007, ECOOP.

[6]  Debra J. Richardson,et al.  Towards A Practical Approach to Test Aspect-Oriented Software , 2004, SOQUA/TECOS.

[7]  Aditya P. Mathur,et al.  Foundations of Software Testing , 2007 .

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

[9]  Yves Le Traon,et al.  A Test-Driven Approach to Developing Pointcut Descriptors in AspectJ , 2009, 2009 International Conference on Software Testing Verification and Validation.

[10]  William G. Griswold,et al.  An Overview of AspectJ , 2001, ECOOP.

[11]  Daniel P. Friedman,et al.  Aspect-Oriented Programming is Quantification and Obliviousness , 2000 .

[12]  Tao Xie,et al.  A framework and tool supports for generating test inputs of AspectJ programs , 2006, AOSD.

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

[14]  Pascale Thévenod-Fosse,et al.  Software error analysis: a real case study involving real faults and mutations , 1996, ISSTA '96.

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

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

[17]  Fabiano Cutigi Ferrari,et al.  Characterising Faults in Aspect-Oriented Programs: Towards Filling the Gap Between Theory and Practice , 2010, 2010 Brazilian Symposium on Software Engineering.

[18]  James C. King,et al.  Symbolic execution and program testing , 1976, CACM.

[19]  Paulo César Masiero,et al.  Integration testing of Object-Oriented and Aspect-Oriented programs: A structural pairwise approach for Java , 2009, Sci. Comput. Program..

[20]  Edsger W. Dijkstra,et al.  A Discipline of Programming , 1976 .

[21]  A. Jefferson Offutt,et al.  Inter-class mutation operators for Java , 2002, 13th International Symposium on Software Reliability Engineering, 2002. Proceedings..

[22]  Wouter Joosen,et al.  Aspect-Oriented Software Development in Practice: Tales from AOSD-Europe , 2010, Computer.

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

[24]  Gregor Kiczales,et al.  Back to the future: a retroactive study of aspect evolution in operating system code , 2003, AOSD '03.

[25]  Paulo Borba,et al.  Distribution and persistence as aspects , 2006 .

[26]  Jianjun Zhao,et al.  Data-flow-based unit testing of aspect-oriented programs , 2003, Proceedings 27th Annual International Computer Software and Applications Conference. COMPAC 2003.

[27]  Ramnivas Laddad,et al.  Aspect-Oriented Programming Will Improve Quality / Aspect-Oriented Programming: the Real Costs? , 2003, IEEE Softw..

[28]  Thaís Vasconcelos Batista,et al.  An exploratory study of fault-proneness in evolving aspect-oriented programs , 2010, 2010 ACM/IEEE 32nd International Conference on Software Engineering.

[29]  Carlos José Pereira de Lucena,et al.  Assessing the Impact of Aspects on Exception Flows: An Exploratory Study , 2008, ECOOP.

[30]  Gregg Rothermel,et al.  An experimental evaluation of selective mutation , 1993, Proceedings of 1993 15th International Conference on Software Engineering.

[31]  Mourad Badri,et al.  Towards a Tool Supporting Integration Testing of Aspect-Oriented Programs , 2007, J. Object Technol..

[32]  Gregor Kiczales,et al.  Aspect-oriented programming , 1996, CSUR.

[33]  A. Jefferson Offutt,et al.  An Experimental Comparison of Four Unit Test Criteria: Mutation, Edge-Pair, All-Uses and Prime Path Coverage , 2009, 2009 International Conference on Software Testing, Verification, and Validation Workshops.

[34]  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..

[35]  Chuan-Wen Chang,et al.  A State-Based Testing Approach for Aspect-Oriented Programming , 2008, J. Inf. Sci. Eng..

[36]  M. Badri,et al.  Generating unit test sequences for aspect-oriented programs: towards a formal approach using UML state diagrams , 2005, 2005 International Conference on Information and Communication Technology.

[37]  Gregg Rothermel,et al.  On the Use of Mutation Faults in Empirical Assessments of Test Case Prioritization Techniques , 2006, IEEE Transactions on Software Engineering.

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

[39]  Glenford J. Myers,et al.  Art of Software Testing , 1979 .

[40]  Mario Luca Bernardi,et al.  Testing Aspect Oriented Programs: an Approach Based on the Coverage of the Interactions among Advices and Methods , 2007 .

[41]  Jim Hugunin,et al.  Advice weaving in AspectJ , 2004, AOSD '04.

[42]  Martin P. Robillard,et al.  Representing concerns in source code , 2007, TSEM.

[43]  Mira Mezini,et al.  Conquering aspects with Caesar , 2003, AOSD '03.

[44]  Siobhán Clarke,et al.  Theme: an approach for aspect-oriented analysis and design , 2004, Proceedings. 26th International Conference on Software Engineering.

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

[46]  Mark Harman,et al.  An Analysis and Survey of the Development of Mutation Testing , 2011, IEEE Transactions on Software Engineering.

[47]  Dianxiang Xu,et al.  A State-Based Approach to Testing Aspect-Oriented Programs , 2005, SEKE.

[48]  Auri Marcelo Rizzo Vincenzi,et al.  Control and data flow structural testing criteria for aspect-oriented programs , 2007, J. Syst. Softw..

[49]  Atanas Rountev,et al.  Regression Test Selection for AspectJ Software , 2007, 29th International Conference on Software Engineering (ICSE'07).

[50]  James M. Bieman,et al.  Aspect-Oriented Refactoring of Legacy Applications: An Evaluation , 2012, IEEE Transactions on Software Engineering.

[51]  Cláudio Sant'Anna,et al.  Evolving software product lines with aspects , 2008, 2008 ACM/IEEE 30th International Conference on Software Engineering.

[52]  Auri Marcelo Rizzo Vincenzi,et al.  Proteum: a family of tools to support specification and program testing based on mutation , 2001 .