Branch Coverage
Branch coverage is a white-box coverage metric that measures the percentage of branches executed by a test suite.
“The coverage of branches in a control flow graph.”
(Definition reproduced from the ISTQB Glossary. Copyright belongs to ISTQB.)
View the complete ISTQB GlossaryWhat is Branch Coverage?
Branch coverage evaluates whether every possible outcome of each decision has been exercised during testing, helping identify untested decision paths.
Coverage calculation: Each true and false decision outcome contributes to overall branch coverage.
Testing objective: Higher branch coverage increases confidence that decision logic has been exercised.
Relationship to statement coverage: Achieving full statement coverage does not necessarily guarantee full branch coverage.
Real World Example
A tax calculation module applies different deductions depending on income band, residency status, and submitted documents.
Reviewing the final tax amount is not enough when important code paths may never execute during testing. Branch coverage helps the tester reason about the structure behind the result.
The tester works with the developer to identify decisions or paths in the calculation logic and designs inputs that exercise the meaningful alternatives.
The team gains better evidence about hidden logic because Branch coverage connects tests to the implementation structure where certain defects can hide.
Practice Questions
Question 1
Which set achieves 100% branch coverage for a single if (A)?
Question 2
Why can 100% statement coverage still miss defects?
Test your knowledge with real ISTQB-style questions
You’ve learned Branch Coverage. Test your understanding with topic-specific questions in our Mock Exams.