Information Technology Reference
In-Depth Information
mutations ( n ) is large, this may lead to an equally large number of test cases.
These test-cases are computationally expensive to generate and time-consuming
to execute. Therefore, it is desirable to minimize the size of the test-suite.
Example 3. Consider the Simulink diagrams in Figures 4a, 4b, and 5. Assume
that we use the model in Figure 5b to generate a test case. Consider the test
case s.i 1 =1 . 2and s.i 2 =23 . 4. The following table lists the observable outputs
of the model for all possible combinations of enable flags:
Input signal 1 Input signal 2 Fault Mutation Output
1.2
23.4
off
off
28.08
1.2
23.4
on
off
0.0
1.2
23.4
off
on
24.6
1.2
23.4
on
on
23.4
This test case is sucient to detect the syntactic mutation, the signal-stuck-at-0
fault, as well as the combination of these modifications.
The observation in Example 3 suggests that it is not strictly necessary to
generate a separate test case for each single modification. In the setting presented
in Example 3, the test vector t =
can be obtained from
the model in which both modifications are enabled. This can be achieved by
generalizing the constraint F j (see (3)) accordingly, i.e., for a set T of indices
corresponding to mutations or faults
{
i 1
1 . 2 ,i 2
23 . 4
}
( i
f i ( i
f i .
F T
:=
T )
T )
⇒¬
(5)
0 <i
n
Notably, t is su cient to cover the fault and the mutation independently.
It follows that it is possible that a test-case t derived from a model M μ with a
combination of several mutations
detects the independent mutations,
too. This can be eciently checked by evaluating the behavior of the mutated
models M ν 1 ,M ν 2 ,... for the input defined by the test-vector t . The execution of
a given test-case on a model is very ecient compared to the model checking-
based computation of a new test-vector for M ν i .
{
ν 1 2 ,...
}
Example 4. We continue working in the setting of Example 4. Consider the test
case s.i 1 =0 . 0and s.i 2 =23 . 4. We can compute the outcome for all different
models for this input by simply executing the test cases:
Input signal 1 Input signal 2 Fault Mutation Output
0.0
23.4
off
off
0.0
0.0
23.4
on
off
0.0
0.0
23.4
off
on
23.4
0.0
23.4
on
on
23.4
This test case is sucient to detect the combination of the syntactic mutation
and the injected signal-stuck-at-0 fault, as well as the single syntactic mutation.
However, it fails to detect the signal-stuck-at-0 fault.
 
Search WWH ::




Custom Search