Conference Paper

Using interfaces to support the testing of crosscutting features

DOI: 10.1145/1176617.1176723 Conference: Companion to the 21th Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA 2006, October 22-26, 2006, Portland, Oregon, USA
Source: DBLP
ABSTRACT
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).

Full-text preview

Available from: uni-ulm.de
Using Interfaces to Support the Testing of Crosscutting Features
Roberta Coelho, Arndt von Staa
Computer Science Department
PUC-Rio, Brazil
{roberta, arndt}@inf.puc-rio.br
Abstract
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.
1. Introduction
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) [7]. 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 [3] are sources
for new types of programming faults [1].
2. Goal Statement
Our goal is to define a verification approach in order to address
the following needs of both framework and crosscutting feature
developers:
(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
[5] which was believed to be a fundamental property for aspect
oriented programming. Sullivan et al [12] 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
this work:
(i) How can we use the information embedded in XPIs between
aspects and classes in order to make the test of crosscutting
features easier?
(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
oracle?
(iii)What are the framework design characteristics that improve
crosscutting feature testability? Can the developer improve
the framework design quality by testing its crosscutting
features?
3. Approach
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.
ACM 1-59593-491-X/06/0010.
782
Page 1

You are reading a preview. Would you like to access the full-text?

  • Source
    [Show abstract] [Hide abstract] ABSTRACT: The goal of exception handling mechanisms is to make programs more reliable and robust. However, the integration of exception handling mechanisms with aspect-oriented languages raises unique issues. This paper presents a PhD work whose goal was to investigate such issues. The main contributions of this work were the following: (i) to perform the first exploratory study aiming at assessing the error proneness of AOP mechanisms on exception flows of programs; (ii) the development of SAFE (Static Analysis for the Flow of Exceptions), an exception-flow analysis tool for AspectJ programs; (iii) the identification of a set of bug patterns on the exception handling code of AO systems; and (iii) the definition of an approach that enables the developer to find faults on the exception handling code statically.
    Preview · Article ·