
Test-Adequacy Assessment Using Program Mutation
Steps 7, 8, and 9: Mutant execution and classification
Execute M against t
Is P(t) = M(t)?
P(t) for all tests
t in T
Ye
s
t
No
8
7
M(t)
P(t)
So far we have selected
a mutant M for execution
against test case t. In Step
7, we execute M against t.
In Step 8, we check if the
output generated by exe-
cuting M against t is the
same or different from that
generated by executing P
against t.
Example 7.11: So far we have selected mutant M
1
and test case t
1
.In
Step 7, we execute M
1
against t
1
. Given the inputs x = 0 and y = 0,
condition x + 1 < y is false leading to 0 as the output. Thus we see
that P(t
1
) = M
1
(t
1
). This implies