White Box Test Cases

 [Previous Chapter]  [Previous Page]  [Contents]  [Next Page]  [Next Chapter]


CoverageInputCoverageDesiredObserved

C0:5,2ACF (TT)1,21,2

8,6ADE (FF)7,87,8

C1:2,5BCF (TT)1,21,2

C2:4,4BDF (TF)4,41,2

7,5ADE (FT)6,71,2

C7:4,8BDE (TF)6,81,2

9,7ADF (FF)7,87,8

*(TT), (FF), (FT), and (TF) specify the boolean values of the two conditions within the (faulty) second if statement.
 
*C0 tries to cover all statements but not the empty else clauses, i.e. B is not included.
 
*C1 adds a test case for B.
 
*C2 completes the set of possible boolean values (there were just (TT) and (FF) so far).
 
*C7 adds BDE and ADF which were missing from the set of 6 possible paths. Note that ACE and BCE are impossible because if C is taken, E can no longer be reached.
 

 [Previous Chapter]  [Previous Page]  [Contents]  [Next Page]  [Next Chapter]
Copyright © 2001, 2002 Andreas Borchert, converted to HTML on February 21, 2002