
Test Generation from Requirements
C
1
C
2
C
3
Inputs to node a
10 0 0C
1
= 0, b = 0
20 0 1
30 1 0
40 1 1C
1
= 0, b = 1
51 0 0C
1
= 1, b = 0
61 0 1
71 1 0
Let us now generate tests using the heuristics applicable to this ex-
ample. First we note that node a matches the OR-node shown in the
top half of Table 2.4. As we want the state of node a to be 0, heuristic
H
1
applies in this situation. H
1
asks us to enumerate all combinations
of inputs to node a such that C
1
and node b are 0. There are two such
combinations: (0, 0) and (0, 1). These two combinations are listed in
the last column of the preceding table.
Next we consider each combination of nodes C
1
and b, one at a
time