Generating unit test sequences for aspect-oriented programs: towards a formal approach using UML state diagrams

Aspect-oriented programming is an emerging software engineering paradigm that improves separation of crosscutting concerns in a program. Existing object-oriented programming languages suffer from a serious limitation in modularizing adequately crosscutting concerns. Many concerns crosscut several classes in an object-oriented system. However, in spite of the many claimed benefits that the aspect paradigm seems to be offering, it remains clear that it is not yet mature. Aspect technology introduces, in fact, new dimensions in terms of control and complexity. Moreover, aspects have great latitude to interact with basic classes of a system. Those interactions constitute a new source for faults in a program. Existing object-oriented testing techniques are not adequate for testing aspect-oriented programs. Thus, new testing techniques must be developed for aspect-oriented programs. We present, in this paper, a new technique for aspect-oriented unit testing based on dynamic behavior. We also introduce several testing criteria. We focus on the integration of one or more aspects to a class. The proposed technique is based on UML statecharts. The primary objective is to verify that this integration is done correctly, without modifying the original behavior of the basic class

[1]  Yoshikazu Yamamoto,et al.  Extending UML with Aspects: Aspect Support in the Design Phase , 1999, ECOOP Workshops.

[2]  Yuanfang Cai,et al.  Non-modularity in aspect-oriented languages: integration as a crosscutting concern for AspectJ , 2002, AOSD '02.

[3]  Lionel C. Briand,et al.  Using simulation to empirically investigate test coverage criteria based on statechart , 2004, Proceedings. 26th International Conference on Software Engineering.

[4]  Renaud Pawlak,et al.  On Getting Use Cases and Aspects to Work Together , 2004, J. Object Technol..

[5]  Otávio Augusto Lazzarini Lemos,et al.  Data Flow Integration Testing Criteria for Aspect-Oriented Programs , 2004 .

[6]  Shaoying Liu,et al.  Criteria for generating specification-based tests , 1999, Proceedings Fifth IEEE International Conference on Engineering of Complex Computer Systems (ICECCS'99) (Cat. No.PR00434).

[7]  A. Jefferson Offutt,et al.  Generating Tests from UML Specifications , 1999, UML.

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

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

[10]  Dianxiang Xu,et al.  ASPECT FLOW GRAPH FOR TESTING ASPECT-ORIENTED PROGRAMS , 2004 .

[11]  Robert V. Binder,et al.  Testing Object-Oriented Systems: Models, Patterns, and Tools , 1999 .

[12]  Jianjun Zhao,et al.  Tool Support for Unit Testing of Aspect-Oriented Software , 2002 .

[13]  Shaoying Liu,et al.  Generating test data from state‐based specifications , 2003, Softw. Test. Verification Reliab..

[14]  Tzilla Elrad,et al.  Aspect-oriented programming: Introduction , 2001, CACM.