[ Previous [ 1] [ 2] [ 3] [ 4] [ 5] [ 6] [ 7] [ 8] [ 9] [ 10] [ 11] [ 12] [ 13] [ 14] [ 15] [ 16] [ 17] [ 18] [ 19] [ 20]

¡@

Journal of Information Science and Engineering, Vol. 24 No. 1, pp. 11-31 (January 2008)

A State-Based Testing Approach for Aspect-Oriented Programming*

Chien-Hung Liu and Chuan-Wen Chang
Department of Computer Science and Information Engineering
National Taipei University of Technology
Taipei, 106 Taiwan
E-mail: {cliu; s4419012}@ntut.edu.tw

In recent years, Aspect Oriented Programming (AOP) has become an emerging technology due to its ability to support the separation of concerns in software development. In particular, AOP allows application requirements to be implemented in separated modules while weaving them together without code tangling. However, this feature also raises a concern about the quality and reliability of AOP programs. Most specifically, the AOP programming constructs, such as join point, pointcut, advice, and aspect, can change the dynamic behavior1 of original base modules and need to be tested thoroughly to ensure the correctness of AOP programs. In this paper, we propose a state-based testing approach for AOP programs. The approach considers the state-based behavior2 changes introduced by different advices in multiple aspects. A test model is presented to abstract the state-based behavior of AOP program with the consideration of the interactions between the base modules and aspects. Based on the model, test cases can be derived so as to uncover the potential state behavior errors in the AOP programs. In addition, an example is provided to show the effectiveness of the proposed approach.

Keywords: software testing, aspect-oriented programming, aspect-oriented software development, aspect-oriented modeling, state-based testing, AOP testing, AspectJ

Full Text (¥ş¤åÀÉ) Retrieve PDF document (200801_02.pdf)

Received February 2, 2007; accepted July 13, 2007.
Communicated by K. Robert Lai, Yu-Chee Tseng and Shu-Yuan Chen.
* This work was supported in part by the National Science Council of Taiwan, R.O.C., under grant No. NSC 95-2221-E-027-092.
1 The dynamic behavior here means the characteristic that base objects can dynamically change at runtime in respond to events, method invocations, or messages.
2 The terms ¡§state-based behavior¡¨ and ¡§dynamic behavior¡¨ are used interchangeably in this paper since the paper adapts state machines to model the dynamic behavior of AOP programs.