Structured Testing - McCabe and Associates
Structured Testing - McCabe and Associates
Structured Testing - McCabe and Associates
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
The “count” module illustrates the effectiveness of structured testing. The commonly used<br />
statement <strong>and</strong> branch coverage testing criteria can both be satisfied with the two tests in Figure<br />
5-4, none of which detect the error. Since the complexity of “count” is five, it is immediately<br />
apparent that the tests of Figure 5-4 do not satisfy the structured testing criterion—three<br />
additional tests are needed to test each decision independently. Figure 5-5 shows a set of tests<br />
36<br />
Figure 5-3. Control flow graph for module “count.”