Using Interfaces to Support the Testing of Crosscutting Features
Roberta Coelho, Arndt von Staa
Computer Science Department
An important question in the context of software product line
development is how to improve the modularization and
composition of crosscutting features. However, little attention has
been paid to the closely related issue of testing the crosscutting
features. There is still a lack of techniques to help developers test
such features. Usually, developers test the crosscutting features in
combination with the affected feature, which impairs the fault
diagnosis. This work proposes a verification approach for
crosscutting features implemented by means of aspects and
crosscutting interfaces (XPIs).
Categories and Subject Descriptors
D.2.5 [Software Engineering]: Software Testing and Debugging;
D.2.11 [Software Engineering]: Software Architecture
General Terms Verification.
Keywords aspect-oriented programming, software testing,
object-oriented frameworks, crosscutting interfaces.
Object-oriented (OO) framework technology has been widely
used in the development of software product lines as a way of
enabling systematic reuse-in-the-large. Besides their advantages,
some researchers [8, 11] have identified the inability of OO
mechanisms to address the modularization of optional and
alternative framework crosscutting features.
Crosscutting features represent concerns that are often spread over
several modules of a software system and tangled with other
features’ implementation (i.e notification and transaction
management) . Usually it is difficult to test such features
individually because there is no specific unit to be tested – these
features are spread over other features.
Aspect-oriented software development (AOSD) [7, 5] has
emerged as a technology which aims at improving the
modularization of crosscutting concerns. Recent work [2, 8, 9, 11]
has explored the use of this new paradigm to improve crosscutting
features’ modularization in product lines. While AOSD provides
an effective way for modularizing crosscutting concerns, it brings
new challenges to software testing. The new programming
constructs provided by aspect-oriented languages  are sources
for new types of programming faults .
2. Goal Statement
Our goal is to define a verification approach in order to address
the following needs of both framework and crosscutting feature
(i) Framework developers want to assure that a crosscutting
feature will not break the framework core functionalities.
(ii) Crosscutting feature developers want to verify whether the
crosscutting feature performs as expected.
The strategies that have been proposed to test aspect oriented
systems can be used (or adapted) to address the need (ii). All of
these strategies, however, are based on the obliviousness property
 which was believed to be a fundamental property for aspect
oriented programming. Sullivan et al  have proposed a new
approach to aspect-oriented design and implementation based on
the definition of crosscutting interfaces (XPI) between aspects and
classes [6, 12]. The XPIs encapsulate a set of design rules,
providing a clear specification of the interaction between aspects
and base code.
Based on the developers needs and on the recent findings on
AOSD, the following research questions have been investigated in
(i) How can we use the information embedded in XPIs between
aspects and classes in order to make the test of crosscutting
(ii) Can we add more information to such XPIs which can be
used in the testing phase of crosscutting features? Can we
use this information for test generation or to build a test
(iii)What are the framework design characteristics that improve
crosscutting feature testability? Can the developer improve
the framework design quality by testing its crosscutting
We propose a verification approach for crosscutting features
implemented by means of aspects and extension join points
(EJPs) [8, 9]. The EJP is a specialization of the XPI design
strategy to the context of framework development. According to
the EJP-based development approach [8, 9], during the framework
design a set of EJPs with their associated contracts are defined
(see Figure 1). These elements are the basis to the feature-level
testing technique and the manual and automatic inspections
techniques that comprise the verification approach proposed here.
The faults discovered in a crosscutting feature can arise from one
of the following sources: (i) bugs in the crosscutting feature logic;
(ii) inaccurate pointcut designator which intercepts a wrong set of
join points; (iii) an emergent property created by interactions
between the crosscutting features and the base code; and (iv)
faults in the core components themselves.
Copyright is held by the author/owner(s).
OOPSLA’06 October 22–26, 2006, Portland, Oregon, USA.