ASPECT-ORIENTED SOFTWARE TESTING TECHNIQUES: A REVIEW

: Software testing is a prominent area of research as it ensures the quality and reliability of the software. Testing an aspect-oriented software is also the latest area of research. Although, research in aspect-oriented software testing has reported a couple of new testing techniques. But, there is no work yet indicated in the literature as studied, to focus on the relationship of aspect-oriented software testing techniques with traditional software testing techniques. Therefore, this position paper handles this shortcoming and presents the basic concepts of aspect-oriented programming, phases of aspect-oriented software development life cycle and testing phases for new researchers to gather the information on the subject. This paper also presents comprehensive details about the relationship of aspect-oriented software testing techniques with other traditional testing techniques.


INTRODUCTION
Aspect-oriented programming (AOP) was started in1997 at Xeox's PARC laboratories with the introduction of the "AspectJ" programming language [1].The main purpose was to introduce AOP , to address the issues of the separation of crosscutting concern such as security, logging, transaction from the logic of the main application. According to Jacobson et.al. [2], concerns reflect the system requirements. Requirements are prioritized according to the user. For example, in a train control system, breaks of train can be a primary concern. Security and safety are considered as policy concern, performance and reliability consider as quality of service concern. Apart from primary concerns, all concerns come under crosscutting concerns.
In traditional programming languages such as procedural and object-oriented languages, functional and non-functional requirements are twine together. Programs are developed using the concept of abstraction. Main constructs of these traditional programming paradigm are procedures and classes. Each construct addresses the functional properties as well as non-functional properties. But, in case of aspect-oriented programming paradigm, application's logic is divided into two concerns: 1) Primary concern or functional properties and 2) Crosscutting concern or non-functional properties. This technique leads to advance the modular programming with a new effective means of software development. The goal of aspect-oriented programming is to enhance the concepts of reusability, maintainability, security etc. Large and complex applications can be developed easily with aspect-oriented programming paradigm (AOPP). So, AOPP coping with complexity and helps to achieve the quality software. Figure 1 shows the concept of aspect-oriented programming by considering banking information system in which withdrawal transaction and transfer transaction are the primary concerns. These concerns are associated with the system's primary purpose. Authentication, authorization and logging are also considered as security requirements. These security requirements are consider as crosscutting concern.
Withdraw Transaction

Cross-Cutting Concerns
Authorization Authentication Logging CrossCutting Concern Core Concern Figure 1 Concepts of Core and Crosscutting Concerns

II. ASPECT-ORIENTED SOFTWARE DEVELOPMENT PHASES
The main aim of aspect-oriented programming is to improve the modularity of the software system in order to make system easier and manageable. Therefore, aspect-oriented programming introduces an extra abstraction mechanism known as aspect. Various software development models have been used in the industry in order to satisfy the need of the business [3]. Figure 2 shows the phases of software development life cycle (SDLC).Each phase of the SDLC performs certain prominent activity. But, in aspect-oriented programming (AOP), each phase of SDLC performs a different role. Various role of AOP in each phase of SDLC has been described below [4]:-

Design phase:-
Design phase specifies the way to develop the software. Figure 3 shows the different activities to be performed in design phase of AOP.

Implementation Phase
In the implementation phase, core and crosscutting concerns are implemented in aspect-oriented programming based languages such as AspectJ, AspectC++ etc. Almost all processes and methodologies are same between OOP and AOP in implementation phase. The following tasks have to be performed in AOP during the implementation of crosscutting concerns are:-• Join points identification Identify the places in the code where crosscutting behaviour is needed.

• Aspect Design
Aspects are designed using consistent patterns so that join points can be easily captured inside the aspects.

Testing Phase
After completing the design and implementation phase, testing phase is starting to execute the algorithm with test data to make sure that it has no logical errors. The most important activity is performed by the tester in AOP is to consider weaving process of aspects and imagine how a program will behave after weaving the aspects.

Maintenance Phase
This phase is considered as a most important phase in SDLC because much development effort goes toward maintenance.
The following tasks are handle in this phase:-

• Creating protection walls
This feature prevents the system from the new changes.

• Implementing new features
In this task, new crosscutting concerns are implemented.

III.
ASPECT-ORIENTED SOFTWARE TESTING PHASES However, AOP increases the quality and reliability of the software but it does not take alone the responsibility to minimize the errors. Developers and programmers might make several types of mistakes in the program such as typological errors, wrong interpretation of user's requirements, prepare incorrect system design documents etc. Therefore, aspectoriented programming paradigm could not be error free. Moreover, new constructs and features of aspect-oriented programming paradigm will introduce new types of faults. There should be a different mechanism to handle the AOP faults. Therefore, traditional testing techniques could not be directly applied to test aspect-oriented program. Henceforth, there should be a different approach to test AOP.
Various activities need to be performed while testing an aspect-oriented software system. These activities are categorized into three steps as shown below in Figure 4.

Creating Test Cases
Test cases of the program are created with little modification of the behavior.

Implementing Performance Testing
Many performance related problems occurred during the software deployment but these problems never faced during development phases. But one can able to handle these problems by using the dynamic profiling mechanism with AOP.

Implementing Performance Testing
Creating Test Cases

Reporting Errors
Aspects are used to collect the useful context. This flexible collection context can be used when problems may occur.

IV. TEST METHODS FOR ASPECT-ORIENTED SOFTWARE SYSTEM
In this section, various testing methods for aspect oriented software have been presented. Testing approaches are classified in order to make a clear understanding of testing approaches for AOSS. Figure 5 shows the classifications of testing methods for AOSS [5].

Data and control flow graph based testing
Data and flow graph are basically used to represent the structure of the software system. Thereafter, this graphical representation of the system is used to derive the test cases.
The following testing methods are based on data and flow graph to evaluate the test cases for AOSS.  Figure 5.Classification of Aspect-Oriented Software System Testing Methods Jhao [6] proposed a technique for selection of tests for two types of units(aspects and classes) for an aspect-oriented program which is based on control flow graph. This technique is used to compute the pairs of an aspect or class which is being tested. This technique is based on the concept of traditional graph based testing. A. Lemos et.al. [7] proposed a control and data flow model which supports structural testing to test unit of aspect-oriented program written in AspectJ. This paper has also proposed an approach for aspect-oriented programs by using data and control flow graphs. F. Wedyan et.al. [8] proposed a data flow testing approach for AOP in which various new data flow coverage criteria have been defined.

State model based testing
State models are used to represent the different states of the system and conditions allow to transit from one state to another. State based testing methods for AOSS are discussed below:-W. Xu [9] proposed a testing approach based upon finite state machine to test aspect oriented program. Moreover, this approach was applied to various AOP problems to detect various faults in AOP. This approach identifies both kinds of faults; traditional faults and new faults which occur in AOP. C. H. Liu et.al. [10] also proposed a testing technique for aspect-oriented program which was based on object state diagram and constructed a weaving model of crosscutting concerns D. Xu et.al. [11] proposed a framework to test aspect oriented program. This framework also helps to detect many aspects fault. P. Wang [12] develop a tool to select test cases automatically. This approach applies to the basics of standard testing technology to select test cases.

UML diagram based testing
Test cases can be easily derived from the UML diagrams like activity diagram, collaboration diagram, state diagram etc. There are various testing techniques available for AOP. Some of testing techniques based on UML diagrams have been discussed below:-M. Badri et. al. [13] proposed a technique based on UML state chart diagram to test unit individually for aspect-oriented programs(AOPs).Test cases are generated to find those faults which occur during the weaving process(Weaving means integrating aspects with classes).P. Massicotte et. al. [14] also proposed a technique for integration testing to integrate aspects with classes using collaboration diagram which covers various coverage criteria. In aspect-oriented program, integration of aspects with base classes. Moreover, a new kind of faults would occur during the integration of aspects with base classes. Therefore, P. Massicotte et.al. [15] proposed a new integration testing approach for aspect-oriented program. Although this approach is adopted from traditional integration testing but it completes its testing process in two steps: 1) test sequences are derived from the interaction of aspects with classes and 2) then verifies these test sequences. The proposed approach is based on collaboration diagram. One more incremental testing technique was also proposed by D. Xu et. al. [16] using the UML state diagram. This approach enhances the concept of reusability.
Madadpour et.al. [17] also proposed a AOP testing approach which is based on UML activity diagram. In this approach, aspects (cross cutting concerns) are integrated with base class (primary concern) and this approach helps to detect faults which commonly occurred during the integration. C. Kaur et.al. [18] was extended the work of [16]. S. Dalal et. al. [19] was developed a tool to automate the work to detect faults occurred during the integration process.

Mutation testing
Mutation testing takes the program and design various mutants by making small changes in the original program. Mutation based testing approaches for AOP as discussed below:-R. T. Alexander [20] proposed a fault model to handle the errors which occur during weaving process of aspects with the base class. M. Mortensen et.al. [21] also proposed a framework for fault based testing for AOP which supported various coverage criteria like statement, insertion, context and def-use coverage.
C. Babu et.al. [22] proposed an approach to detect various types of faults which occurs during the composition of aspects in AOP. This paper also proposed a fault model which caters to identify faults in the earlier phases of software development life cycle process. This approach extends the concept of modularity used in object-oriented programming paradigm. A.A. Ghani et.al. [23] also proposed a semantic mutation testing for aspect oriented programs which mutates the semantic of the language in which the program is written. This approach is considered as a complementary over syntactic mutation testing types of faults.
C. Zhao et.al. [24] proposed an approach to test AspectJ program which is based on fault model. Furthermore, interaction model and dependency model help to derive fault model. F. C. Ferrari et.al. [25] proposed automated mutation testing for aspect-oriented programs where they designed the mutation operators using AspectJ programming language. This paper covers many traditional faults as well as aspectoriented faults.

Random testing
Random testing generates the test cases randomly and it is very simple and less costly technique. Only a few papers have devoted to test AOP using random testing technique. R. M. Parizi et.al. [26] proposed a framework for random testing technique to test an aspect-oriented program. This framework caters to generate random input and selection strategy for AOP.

V. DEPENDENCY OF ASPECT-ORIENTED SOFTWARE TESTING TECHNIQUES OVER TRADITIONAL SOFTWARE TESTING TECHNIQUES
This section describes the relationship between the traditional approaches for traditional software development and proposed testing approaches of aspect oriented software. However, an aspect-oriented program (written in AspectJ) with classes, methods, packages and interfaces is similar to object-oriented program (written in Java). But, aspect weaving programs can affect the types of faults commonly found in traditional programming (i.e. object oriented programs and procedural programs).Clearly, AOPs contain some different faults. Therefore, fault handling mechanism could be different from traditional programming but somewhat similar. Therefore, according to Amman et.al. [27],four types of models 1)Graph based 2)Code based 3) Domain Reduction and 4) Syntactic Structure models have been used to develop the sequential software. Moreover, test methods are also categorized into four types based on the model on which software is based on.

Graph -based coverage
Graph-based coverage means the way to evaluate test set according to graphical representation of the software. Graph based coverage criteria is divided into two types:-

Code based coverage
Code based coverage criteria have increased in recent time. Logic expressions are derived from the decision points of the program, finite state machines, state charts and requirements.

Domain partitioning based coverage
Domain partitioning means to divide the input space based on the requirement. This technique can be applied to each level of testing like unit testing, integration testing and system testing.

Syntax based coverage
In syntax based coverage criteria, tests are derived from the syntax of the software. Syntax is based on the programming language's grammar rules in which program is developed. Table 1 shows the dependence of aspect-oriented testing methods over traditional testing methods and. (The symbol ""=based on traditional methods, " "=not yet determined).

VI. CONCLUSION
This position paper briefly evaluates the significance of aspect-oriented software paradigm, software development life cycle, software testing phases and various testing methods of AOSS. This paper also caters to comprehensive analyze the relationship between aspect-oriented software testing methods and traditional testing methods. This paper helps the testers to choose a particular testing technique based on his /her requirements regardless of trying all testing techniques.