
 
its automation, since these techniques implicity 
assure characteristics such as traceability, reuse, 
automation and other good chracteristics for the 
engineering process.
  
The following section analyses the most 
significant works relating to testing in SPL and the 
oracle problem. Section 3 presents an example, 
which will be used to illustrate the proposal. After 
that, the approach is presented in Section 4. Finally, 
we draw our conclusions and present future lines of 
work. 
2 RELATED WORK 
Testing in the context of SPL includes the derivation 
of test cases for the line and for each specific 
product, exploiting the possibilities of variability to 
reduce the cost of creating both the test model and 
the line test cases. This includes their instantiation to 
test each product. In general, testing artefacts are 
derived at domain engineering level, and they are 
transformed for specific products afterwards. Almost 
all the proposals to generate tests for SPLs define 
their own models to represent the testing artefacts 
and variability in the test model.  
The next paragraph summarises the most important 
works. 
Nebut et al. (Nebut et al., 2003) propose a 
pragmatic strategy in which test cases for each of the 
different products of an SPL are generated from the 
same SPL functional requirements. Source artefacts 
are parameterised use cases annotated with contracts 
(written in 1st-order logic) that represent pre- and 
post-conditions. Bertolino et al. (Bertolino et al., 
2004) propose a methodology based on the category-
partition method named PLUTO (Product Line Use 
Case Test Optimisation), which uses PLUCs 
(Product Line Use Cases). A PLUC is a traditional 
use case with additional elements to describe 
variability. For each PLUC, a set of categories (input 
parameters and environment description) and test 
data is generated. Kang et al. (Kang et al., 2007) use 
an extended sequence diagram notation to represent 
use case scenarios and variability. The sequence 
diagram is used as the basis for the formal derivation 
of the test scenario given a test architecture. Reuys 
et al. (Reuys et al., 2005) present ScenTED 
(Scenario-based Test case Derivation), where 
activity diagrams are used as test models from which 
test case scenarios are derived. Olimpiew and 
Gomma (Olimpiew and Gomaa, 2006) describe a 
parametric method, PLUS (Product Line UML-
based Software engineering).  Here, customisable 
test models are created during software product line 
engineering in phases. 
Whether in the context of software products lines 
or in the traditional context, one of the most 
important tasks in software testing is the definition 
of the oracle, which is the mechanism provided for a 
test case to determine whether it has found a fault. 
According to Baresi and Young (Baresi and Young, 
2001), all the methods for generating tests depend on 
the availability of oracles, since they are always 
required to determine the success or failure of the 
test. For Bertolino (Bertolino, 2007), an “ideal 
oracle” realistically is an engine/heuristic that can 
emit a pass/fail verdict over the observed test 
outputs. Thus, the automation of the oracle is one the 
most important difficulties in testing research (Offutt 
et al., 2003), since there is no a known method for 
its generic description and, in practice, it must 
always be manually described. The work by Baresi 
and Young (Baresi and Young, 2001) (published in 
2001) is a complete analysis of the state–of-the-art 
about the oracle problem. Most of the proposals they 
analyse refer to the insertion of assert-like 
instructions in the source code. Later, other works 
have made proposals to solve this problem using 
other techniques such as artificial neural networks 
(Jin et al., 2008) or metamorphism (Mayer and 
Guderlei, 2006). The automation of the oracle has 
special significance in SPL, since meaningful 
portions of the system are analysed and developed at 
the domain engineering level, which includes the 
definition of their tests. Therefore, it is quite 
interesting to apply reusing and traceability not only 
to develop artefacts, but also to test them, including 
oracle descriptions.  
In summary, software engineering communities 
have everything ready to work intensively with 
model driven approaches in SPL, but none of 
existing proposals for testing in SPL automate their 
transformations. Also, the problem of oracle 
automation still remains and it is important to 
propose ideas for its resolution. The SPL context 
offers an excellent opportunity to improve classic 
software engineering practices, development 
methods and techniques for testing. The joint use of 
SPL and model-based testing is very propitious for 
improving test and oracle automation. In the 
approach presented in this document, a set of 
metamodels and a process of seven steps have been 
developed with three goals: 1) generate test artefacts 
automatically at domain level with variability, 2) 
remove variability and generate automatically 
executable tests for specific products, and 3) support 
the generation of oracles through states and special  
TESTING IN SOFTWARE PRODUCT LINES - A Model based Approach
47