White-Box Testing

Steven Zeil

Old Dominion University, Dept. of Computer Science

Table of Contents

1. White-Box Testing
1.1. Combining Black and White-Box Testing
2. Statement Coverage
2.1. Example: statement coverage
2.2. 100% Coverage may not be Possible
2.3. Monitoring Statement Coverage
2.4. Monitoring Statement Coverage with gcov
3. Branch Coverage
3.1. Difference from Statement Coverage
3.2. Difference from Statement Coverage
3.3. Example: branch coverage
3.4. Monitoring Branch Coverage with gcov
4. Loop Coverage
5. Final Thought: Combining Black and White-Box Testing

Testing traditionally can be conducted in three styles