lows. Section 2 presents the EAs applied in this work.
Section 3 presents our approach for robustness testing
and some experiments. Section 4 remarks some con-
clusions and future works.
2 EVOLUTIONARY
ALGORITHMS
Genetic Algorithm (GA) is one of the evolutionary al-
gorithms most used and known nowadays. The main
steps of a generic GA consist of selecting individuals
with higher fitness for the next population and evolv-
ing individuals with crossover and mutation opera-
tors during a given number of generations. We use a
GA with one-point crossover (a single point to recom-
bine two individuals), simple mutation (one value that
represents an individual is changed), selection by the
roulette wheel scheme (individuals are chosen propor-
tional to its fitness) and integer codification.
The Generalized Extremal Optimization (GEO)
algorithm (De Sousa et al., 2003) is an evolutionary
algorithm based on a model of natural evolution (Bak
and Sneppen, 1993). The main steps of GEO are pre-
sented below. Firstly, the population of N design vari-
ables is initialized randomly with uniform distribu-
tion. In the second step, for each variable is associated
a fitness value, given by ∆
i
= F
i
− re f . F
i
is the value
of the objective function when the variable is mutated
to other value mut
i
of the variable domain and re f is
a given value of reference (e.g., zero). After the ∆
i
calculation, the value of the variable i returns to its
original one. This process is repeated to all variables.
In the next step, all variables are ranked by their fit-
ness value. The first position (k = 1) of the ranking
belongs to the least adapted variable and the last posi-
tion (k = N) to the best adapted one. For a maximiza-
tion problem, the highest value of ∆
i
means k = 1 and
the lowest value means k = N. A variable j is selected
to be mutated according to the probability distribution
P ∼ k
−τ
, where k is the rank of the variable j and τ a
free control parameter. If the stopping condition is not
achieved, the algorithm returns to second step.
3 THE PROPOSED APPROACH
Robustness testing in this paper consists in verifying
whether the protocol has an acceptable behavior in
presence of unexpected inputs that can be caused by
bugs in parts of the host systems or links. We aim to
test whether the error detection and recovery mech-
anisms were implemented according to the specifica-
tion. The evolutionary approach proposed here for ro-
bustness testing is described below. According to the
specification, a model is built to represent the protocol
behavior. For the test generation process, the model is
simulated given a test sequence. Note that it is not the
implementation under test but only an executable ver-
sion of the protocol model (simulator). The simulator
code is manually instrumented in order to track the
triggered transitions by a test sequence. In order to
reduce test effort and costs, the test selection is based
on test purposes. As we focus on robustness testing,
the test purposes are the transitions corresponding to
unexpected inputs (T
target
). The EA generates test se-
quences seq trying to cover T
target
. The instrumented
simulator takes seq as input and produces the transi-
tions triggered by seq. The test purposes coverage is
evaluated by the EA through the objective function
that encodes the test criterion. After the stopping cri-
terion of the evolutionary algorithm is achieved, the
best test sequence found during the search is returned.
The behavior model used in our approach is
an EFSM composed of states, input events, output
events, variables, parameters and a state transition
function. The function takes the current state and an
input event, verifies if the associated guard is satisfied
and, in affirmative case, the transition is triggered, re-
turning output events and bringing the machine to the
next state. The guard is a logical expression involving
conditions on parameters and variables.
Each individual of the population in GA is
represented by a test sequence defined as seq =
{e
1
,e
2
,...,e
N
}, where e
i
is a input event and N is
the sequence size, considering EFSM as the protocol
model. While in GEO, the test sequence represents
the entire population. Note that each e
i
represents a
design variable. The set of transitions to satisfy the
test purposes is T
target
= {t
1
,t
2
,...,t
w
}, where t
i
∈ T .
The objective function to be optimized is defined as:
Maximize F(seq) = c/|T
target
| (1)
where |T
target
| is the cardinal number of T
target
and
c = |T
triggered
∩T
target
| is the number of triggered transitions
(T
triggered
) in common with T
target
.
As an example of how a generated sequence could
trigger a set of transitions in a EFSM and how the value
of the objective function is calculated, consider the ma-
chine M
1
shown in Figure 1. If the test sequence is cho-
sen to have size 4, there will be 4 design variables to
be operated by GEO or GA. If the test sequence gen-
erated by one of these algorithms is seq = {e,a,d,c} it
will trigger the set T
triggered
= {t
1
,t
5
,t
7
}. Considering c
the unexpected input, the set of transitions to satisfy the
test purposes is T
target
= {t
3
,t
4
,t
7
} and the objective func-
tion value associated with the test sequence seq will be
1/3 = 0.3333.
IJCCI 2009 - International Joint Conference on Computational Intelligence
278