A Joinpoint Coverage Measurement Tool for Evaluating the Effectiveness of Test Inputs for AspectJ Programs

Testing aspect-oriented programs is challenging in part because of the interactions between the aspects and the base classes with which the aspects are woven. Coverage metrics, such as joinpoint coverage, address faults resulting from the changes in base class control flow that may be introduced by the woven advices. Definitions of joinpoint coverage in the literature typically require counting the execution of aspects at each joinpoint. We present a tool for measuring joinpoint coverage from two perspectives: per advice, which measures the execution of the advice at each joinpoint it is woven into, and per class, which measures the execution of all the advices in each joinpoint in the class. This gives a more detailed measurement of joinpoint coverage and helps in identifying what more needs to be tested in both the base class and the aspect. The tool is based on AspectJ and Java bytecode, and thus, does not require any source code. We demonstrate the use of our tool to measure the joinpoint coverage of test inputs generated by Xie and Zhao's Aspectra framework.

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

[2]  Don Batory,et al.  Using AspectJ to Implement Product-Lines: A Case Study , 2002 .

[3]  Dianxiang Xu,et al.  State-based testing of integration aspects , 2006, WTAOP '06.

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

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

[6]  James M. Bieman,et al.  A test driven approach for aspectualizing legacy software using mock systems , 2008, Inf. Softw. Technol..

[7]  Cristina V. Lopes,et al.  Aspect-oriented programming , 1999, ECOOP Workshops.

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

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

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

[11]  Lori Pollock,et al.  Testing with Respect to Concerns , 2003 .

[12]  Zhao Jianjun Unit Testing for Aspect - Oriented Programs , 2003 .

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

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

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

[16]  Lori L. Pollock,et al.  Testing with respect to concerns [software maintenance] , 2003, International Conference on Software Maintenance, 2003. ICSM 2003. Proceedings..

[17]  Roger T. Alexander,et al.  Distributing classes with woven concerns: an exploration of potential fault scenarios , 2005, AOSD '05.

[18]  Gregor Kiczales,et al.  Aspect-oriented programming , 2001, ESEC/FSE-9.

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

[20]  Michael Haupt,et al.  Virtual machine support for aspect-oriented programming languages , 2008 .

[21]  David Notkin,et al.  Rostra: a framework for detecting redundant object-oriented unit tests , 2004, Proceedings. 19th International Conference on Automated Software Engineering, 2004..