
396 ◾ Software Metrics
One testing strategy is to select test cases so that every program state-
ment is executed at least once. is approach is called statement coverage—
each statement is a test requirement. For deterministic soware, each test
case causes one test path through the program to execute. In terms of the
program owgraph, statement coverage is achieved by nding a set of test
cases that execute test paths such that every owgraph node lies on at least
one test path.
EXAMPLE 9.18
Figure 9.14 contains a program written to meet the specication S of Example
9.17. We can achieve 100% statement coverage for this program by choo