📖 What is Branch Coverage?
The percentage of branches of control flow (such as true and false outcomes of an IF statement) that have been exercised by a test suite. It is calculated by dividing the number of executed branches by the total number of branches.
"Exam tip: 100% branch coverage ALWAYS guarantees 100% statement coverage. It is stronger than statement coverage."
📚 Certification: Certified Tester Foundation Level (CTFL-v4.0)
🔑 What are the Key Concepts of Branch Coverage?
- ▸ Percentage of executed branches
- ▸ Guarantees statement coverage
- ▸ Tests true and false outcomes
- ▸ Calculated as executed / total branches
🎯 How does Branch Coverage appear on the CTFL-v4.0 Exam?
Calculate branch coverage from a code snippet.
Find the minimum test cases for 100% branch coverage.
Compare branch coverage to statement coverage.
❓ Frequently Asked Questions
Does 100% branch coverage guarantee 100% statement coverage?
Yes, always.
What is a branch?
A possible outcome of a decision point, like True or False.