II. WHITE BOX TESTING
• Use Internal Structure of a Program to Generate Test Cases.
• Select Test Set T to satisfy some Coverage criterion C :
Execution of a Program on All Elements of T assures that C is
• Statement Coverage
C : Each (elementary) statement gets executed at least once.
• Edge Coverage wrt the Control Flow Graph of a Program
Control Flow Graphs for Elementary, Conditional, Looping,
and Sequential Statements
C : Each edge is traversed at least once.
• Condition Coverage
C : Edge Coverage + Each part of a Condition is executed at least
• Path Coverage
C : All paths from the start to the finish node through the control flow graph are traversed at least once.
Problem: too many paths (e.g., loops)
Heuristics for loops: Traverse a minimum number of times, a
maximum number of times, and a typical number of times.