Using mutation to design tests for aspect-oriented models

Context: Testing for properties such as robustness or security is complicated because their concerns are often repeated in many locations and muddled with the normal code. Such "cross-cutting concerns" include things like interrupt events, exception handling, and security protocols. Aspect-oriented (AO) modeling allows developers to model the cross-cutting behavior independently of the normal behavior, thus supporting model-based testing of cross-cutting concerns. However, mutation operators defined for AO programs (source code) are usually not applicable to AO models (AOMs) and operators defined for models do not target the AO features.Objective: We present a method to design abstract tests at the aspect-oriented model level. We define mutation operators for aspect-oriented models and evaluate the generated mutants for an example system.Method: AOMs are mutated with novel operators that specifically target the AO modeling features. Test traces killing these mutant models are then generated. The generated and selected traces are abstract tests that can be transformed to concrete black-box tests and run on the implementation level, to evaluate the behavior of the woven cross-cutting concerns (combined aspect and base models).Results: This paper is a significant extension of our paper at Mutation 2015. We present a complete fault model, additional mutation operators, and a thorough analysis of the mutants generated for an example system.Conclusions: The analysis shows that some mutants are stillborn (syntactically illegal) but none is equivalent (exhibiting the same behavior as the original model). Additionally, our AOM-specific mutation operators can be combined with pre-existing operators to mutate code or models without any overlap.

[1]  Tzilla Elrad,et al.  Stateful aspects: the case for aspect-oriented modeling , 2007 .

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

[3]  Matthew Alexander Webster,et al.  Eclipse AspectJ: Aspect-Oriented Programming with AspectJ and the Eclipse AspectJ Development Tools , 2004 .

[4]  A. Jefferson Offutt,et al.  Mutation-based testing criteria for timeliness , 2004, Proceedings of the 28th Annual International Computer Software and Applications Conference, 2004. COMPSAC 2004..

[5]  Jennifer Pérez,et al.  Integrating aspects in software architectures: PRISMA applied to robotic tele-operated systems , 2008, Inf. Softw. Technol..

[6]  Robert B. France,et al.  Directives for Composing Aspect-Oriented Design Class Models , 2006, LNCS Trans. Aspect Oriented Softw. Dev..

[7]  Lidia Fuentes,et al.  Designing and Weaving Aspect-Oriented Executable UML Models , 2007, J. Object Technol..

[8]  Lingyu Wang,et al.  Aspect weaver: a model transformation approach for UML models , 2010, CASCON.

[9]  Fadi Wedyan,et al.  On generating mutants for AspectJ programs , 2012, Inf. Softw. Technol..

[10]  M. Trakhtenbrot,et al.  New Mutations for Evaluation of Specification and Implementation Levels of Adequacy in Testing of Statecharts Models , 2007, Testing: Academic and Industrial Conference Practice and Research Techniques - MUTATION (TAICPART-MUTATION 2007).

[11]  Frits W. Vaandrager,et al.  Testing timed automata , 1997, Theor. Comput. Sci..

[12]  Kim G. Larsen,et al.  Time-Optimal Real-Time Test Case Generation Using Uppaal , 2003, FATES.

[13]  Wang Yi,et al.  Uppaal in a nutshell , 1997, International Journal on Software Tools for Technology Transfer.

[14]  Wynne Hsu,et al.  DESIGN OF MUTANT OPERATORS FOR THE C PROGRAMMING LANGUAGE , 2006 .

[15]  Bernhard K. Aichernig,et al.  MoMut::UML Model-Based Mutation Testing for UML , 2015, 2015 IEEE 8th International Conference on Software Testing, Verification and Validation (ICST).

[16]  Lionel C. Briand,et al.  Modeling robustness behavior using aspect-oriented modeling to support robustness testing of industrial systems , 2011, Software & Systems Modeling.

[17]  Rajeev Alur,et al.  A Theory of Timed Automata , 1994, Theor. Comput. Sci..

[18]  Michaela Huhn,et al.  Generation of Optimized Testsuites for UML Statecharts with Time , 2004, TestCom.

[19]  K. N. King,et al.  A fortran language system for mutation‐based software testing , 1991, Softw. Pract. Exp..

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

[21]  Márcio Eduardo Delamaro,et al.  Mutation analysis testing for finite state machines , 1994, Proceedings of 1994 IEEE International Symposium on Software Reliability Engineering.

[22]  Jim Smith,et al.  Separation of Fault Tolerance and Non-Functional Concerns: Aspect Oriented Patterns and Evaluation , 2010, J. Softw. Eng. Appl..

[23]  W. Eric Wong,et al.  Mutation Testing Applied to Validate Specifications Based on Petri Nets , 1995, FORTE.

[24]  J.-C. Rault,et al.  A software reliability assessment based on a structural and behavioral analysis of programs , 1976, ICSE '76.

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

[26]  G. G. Stokes "J." , 1890, The New Yale Book of Quotations.

[27]  Dianxiang Xu,et al.  Testing aspect‐oriented programs with finite state machines , 2012, Softw. Test. Verification Reliab..

[28]  Wang Yi,et al.  Timed Automata: Semantics, Algorithms and Tools , 2003, Lectures on Concurrency and Petri Nets.

[29]  Robert M. Hierons,et al.  Mutation testing from probabilistic and stochastic finite state machines , 2009, J. Syst. Softw..

[30]  A. Jefferson Offutt,et al.  Introduction to Software Testing , 2008 .

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

[32]  Tao Xie,et al.  Efficient Mutant Generation for Mutation Testing of Pointcuts in Aspect-Oriented Programs , 2006, Second Workshop on Mutation Analysis (Mutation 2006 - ISSRE Workshops 2006).

[33]  Jacques Klein,et al.  KerTheme: Testing Aspect Oriented Models , 2006 .

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

[35]  David Harel,et al.  Statecharts: A Visual Formalism for Complex Systems , 1987, Sci. Comput. Program..

[36]  John A. Clark,et al.  Class Mutation : Mutation Testing for Object-Oriented Programs , 2000 .

[37]  Wanchai Rivepiboon,et al.  Automated-generating test case using UML statechart diagrams , 2003 .

[38]  Dianxiang Xu,et al.  Testing Aspect-Oriented Programs with UML Design Models , 2008, Int. J. Softw. Eng. Knowl. Eng..

[39]  James Lyle Peterson,et al.  Petri net theory and the modeling of systems , 1981 .

[40]  Simone do Rocio Senger de Souza,et al.  Mutation Testing Applied to Estelle Specifications , 2004, Software Quality Journal.

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

[42]  Tzilla Elrad,et al.  Motorola WEAVR: Aspect and model-Driven Engineering , 2007, J. Object Technol..

[43]  John A. Clark,et al.  Assessing Test Set Adequacy for Object-Oriented Programs Using Class Mutation , 2000 .

[44]  Jacques Klein,et al.  Executable Aspect Oriented Models for Improved Model Testing , 2006 .

[45]  Lionel C. Briand,et al.  An industrial application of robustness testing using aspect-oriented modeling, UML/MARTE, and Search algorithms , 2011, MODELS'11.

[46]  Brian Nielsen,et al.  Automated test generation from timed automata , 2001, International Journal on Software Tools for Technology Transfer.

[47]  Daniel Sundmark,et al.  Mutating aspect-oriented models to test cross-cutting concerns , 2015, 2015 IEEE Eighth International Conference on Software Testing, Verification and Validation Workshops (ICSTW).

[48]  Jan Jürjens,et al.  Model-Based Security Engineering with UML , 2004, FOSAD.

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

[50]  Hewlett-Packard An Approach for Adequate Testing of AspectJ Programs , 2005 .

[51]  Lionel C. Briand,et al.  Generating Complex and Faulty Test Data through Model-Based Mutation Analysis , 2015, 2015 IEEE 8th International Conference on Software Testing, Verification and Validation (ICST).

[52]  Tzilla Elrad,et al.  Motorola WEAVR: Aspect Orientation and Model-Driven Engineering , 2007 .

[53]  Ana R. Cavalli,et al.  Specification of Timed EFSM Fault Models in SDL , 2007, FORTE.

[54]  Marius Mikucionis,et al.  Formal Methods and Testing , 2008 .

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

[56]  Jon Whittle,et al.  MATA: A Tool for Aspect-Oriented Modeling Based on Graph Transformation , 2007, MoDELS Workshops.