Test-Adequacy Assessment Using Program Mutation
guish all these four mutants are sufficient to guarantee that all four
statements in F3 have been executed at least once.
trap_on_statement(); M2
while (x ! = y)
{
trap_on_statement(); M3
}
while (x ! = y)
{
if (x < y) M4
trap_on_statement();
else
x
-
= y;
}
while (x ! = y)
{
if (x < y) M5
y
-
= x;
else
trap_on_statement();
}
If the STRP is used with the entire program, the tester will be
forced to design test cases that guarantee that all statements have
been executed. Failure to design such a test set implies that there is
some unreachable code in the program.
7.10.9.2 Trap on if Condition
The STRI mutation operator is designed to provide branch analysis for
any if statements in P. When used in addition to the STRP, SSWM