Branch Testing
Branch testing is a white-box test technique that verifies every possible branch or decision outcome in a program has been executed.
“A white-box test technique in which the test conditions are branches.”
(Definition reproduced from the ISTQB Glossary. Copyright belongs to ISTQB.)
View the complete ISTQB GlossaryWhat is Branch Testing?
Branch testing focuses on exercising every true and false outcome of decision points within the code. It helps uncover defects hidden in conditional logic.
Decision coverage: Every branch created by an if, switch, or similar construct should be executed.
Relationship to branch coverage: Branch testing aims to achieve high or complete branch coverage.
Benefits: Testing all decision outcomes increases confidence that control flow behaves correctly.
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 testing 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 testing connects tests to the implementation structure where certain defects can hide.
Practice Questions
Question 1
Which BEST demonstrates branch testing?
Question 2
A function has one if condition. Which minimum tests achieve branch testing?
Test your knowledge with real ISTQB-style questions
You’ve learned Branch Testing. Test your understanding with topic-specific questions in our Mock Exams.