chapter 3 proposes an incremental testing
procedure consisting of successive testing phases
characterized by gradually increasing levels of
contextual detail;
chapter 4 is devoted to the automatic generation
of optimized CPN-based tests by means of 2
different optimization strategies: the former
addresses conflicting objectives by pre-defined
target priorities (section 4.1), while the latter one
allows to capture varying target priorities by
moving along a whole Pareto front (section 4.2);
finally, chapter 5 illustrates the practicability of
the technique developed in the light of an
example inspired by a real-world application
involving cooperating forklifts.
1.2 Related Work
The approach presented in this article is based on the
classical concept of model-based testing (e.g. Utting
and Legeard, 2007; Broy et al., 2005) allowing for
the extraction of significant test cases from
dedicated behavioural and environmental models. In
order to capture the behaviour of cooperating
autonomous systems, it makes use of the modelling
language CPNs (Jensen and Kristensen, 2009). The
coverage criteria proposed in section 2.2 were partly
inspired by already existing coverage concepts (Zhu
and He, 2002) for Predicate-Transition Petri Nets
(Genrich and Lautenbach, 1981). For the purpose of
automatic test case generation, they were transferred
to CPNs giving rise to appropriate metrics for the
evaluation of the fitness of candidate test case sets.
Alternative approaches (Nguyen et al., 2012) and
(Micskei et al., 2012) were also devoted to the
automatic generation of test cases for autonomous
software agents by means of evolutionary
techniques. They differ, however, from the target
pursued in the present article by focusing on testing
for robustness in terms of aiming at the generation of
exceptional test scenarios, e.g. involving unusually
high stress, human misuse, communication
anomalies, behavioural extremes etc. Such
approaches assume the previous identification of
anomalous behaviour; this may be hard to be
achieved in general, especially in case of numerous
interacting agents. In addition, they do neither
address the global amount of behavioural
multiplicity captured by interacting autonomous
systems, nor the amount of testing required; both
these objectives, on the other hand, are pursued by
the technique developed in this article.
2 MODEL-BASED TESTING
USING CPNS
2.1 CPNs for Modelling Autonomous
Cooperating Agents
In order to capture the high behavioural multiplicity
of interaction scenarios arising from autonomous
cooperation, an adequate modelling notation is
required. Coloured Petri Nets (Jensen and
Kristensen, 2009) have proven to be particularly
useful for this purpose thanks to their capability of
providing a compact and scalable representation
(Lill and Saglietti, 2012a).
Classical Petri Nets are well-known techniques
for modelling and analyzing concurrent processes, in
particular capturing their cooperative behaviour as
well as potential conflicts. CPNs result by enriching
the tokens of ordinary Place/Transition Petri Nets
(Murata, 1989) with type-specific data values
(colours). For this purpose, each CPN place is
assigned a colour set specifying the type of tokens
that may be allocated to that place. At any time, the
net marking defines the current state.
In order to control the production and
consumption of coloured tokens, CPN arcs are
assigned dedicated arc expressions determining a
multi-set of coloured tokens to be produced resp.
consumed during transition firings. In order for a
transition to fire, each variable occurring in its input
arc expressions has to be bound to a specific colour
such that a sufficient number of tokens of that colour
(determined by evaluating each input arc expression)
is available in the corresponding input place. The
firing of a transition w.r.t. an enabling variable
binding is denoted as an event. Each event leads first
to the consumption of tokens in each input place of
the transition in amounts and colours as indicated by
evaluating the corresponding input arc expression.
After the firing, tokens are produced in output places
in amounts and colours as indicated by evaluating
corresponding output arc expressions of the
transition. Transition guards may further restrict the
firing of a transition by requiring the fulfilment of
given conditions.
The sound mathematical basis on which CPNs
are based allows for the use of formal analysis
techniques (Jensen and Kristensen, 2009).
Furthermore, dedicated tools support step-wise
simulation and state space analysis (Jensen,
Kristensen and Wells, 2007; Westergaard and
Kristensen, 2009). While sharing with classical Petri
Nets the benefit of providing an intuitively appealing
visualization of complex processes, CPNs offer
ICSOFT-EA2014-9thInternationalConferenceonSoftwareEngineeringandApplications
288