Testing Foundation
What is Software Testing?
Objective of Testing
Why is testing necessary?
Common Terms used in Testing
Verification Vs Validations
QA Vs QC
Debugging Vs Testing
Seven Testing Principles
SDLC Vs STLC
Fundamentals of Test Process
Software quality Factors
Software Development Models
Waterfall Model
V models
Iterative Model
Test Levels
Component Testing
Integration Testing
System Testing
Acceptance Testing
Strategies for Integration Testing
Big Bang
Stubs and Driver
Top Down Testing
Bottom Up Testing
Test Types
Functional Testing
Non- Functional Testing
Structural Testing
Re-testing & Regression Testing
Static AND Dynamic Techniques
Static Technique
Dynamic Technique
Static Analysis by Tools
White Box Techniques
Statement Coverage Testing
Branch Coverage Testing
Decision Coverage Testing
Path Coverage
Black Box Techniques
Equivalence Partitioning
Boundary Value Analysis
Decision Table testing
State Transition testing
Experience Based TestingTechniques
Random Testing
Exploratory Testing
Error Guessing
Functional Testing
Integration Testing
Unit Testing
System Testing
Smoke testing
Sanity testing
Regression Testing
Usability Testing
Security Testing
User Acceptance Testing
White Box & Black Box Testing
Globalization & Localization Testing
Non Functional Testing
Compatibility testing
Endurance testing
Load testing
Performance testing
Recovery testing
Scalability testing
Stress testing
Volume testing
Test Planning and Estimation
Test Planning
Test Strategies Vs Test Plan
Test Approaches
Risk and Testing
Product Risks
Project Risks
Defect Management
Defect LifeCycle
Severity Vs Priority
What is Branch Coverage Testing ?
Branch Coverage is a white box testing method in which every outcome from a code module(statement or loop) is tested. The purpose of branch coverage is to ensure that each decision condition from every branch is executed at least once. It helps to measure fractions of independent code segments and to find out sections having no branches.
It uses a control flow graph to calculate the number of branches.
Branch Coverage = Total number of Branch Executed
/ Total No of Branches
Branch Coverage is sometimes also described as saying that each branch condition must have been true at least once and false at least once during testing.
Example:
To learn branch coverage, let’s consider the below example
Read A
Read B
IF A+B > 50 THEN
Print "Large"
ENDIF
If A+B<50 THEN
Print "Small"
ENDIF
Flow Chart of Above Code

To calculate BranchCoverage, We have to find out the minimum number of paths so that all the edges are covered.
First Case : traversing through “Yes “decision, the path is 1-2-4-5-6-8 but edges 3 and 7 are not covered in this path.
Second Case :To cover the edges 3 & 7 as these are not covered in first step, we have to traverse through “No” decision. In the case of “No” decision the path is 1-3-5-7,
So by traveling through these two paths, all branches have covered.
Hence BranchCoverage is 2.
The main purpose of the Branch Coverage Testing is to make sure every functional test scenario has the ability to cover all the potential branching for functional looping statements.
Branch Coverage Testing is used to make sure that all the branches in the code are directed to the essential functional requirements mentioned in the application requirement specification provided by the client or the business stakeholders.
Reference : click on this link
Recommended Articles:
Testing Foundation
What is Software Testing?
Objective of Testing
Why is testing necessary?
Common Terms used in Testing
Verification Vs Validations
QA Vs QC
Debugging Vs Testing
Seven Testing Principles
SDLC Vs STLC
Fundamentals of Test Process
Software quality Factors
Software Development Models
Waterfall Model
V models
Iterative Model
Test Levels
Component Testing
Integration Testing
System Testing
Acceptance Testing
Strategies for Integration Testing
Big Bang
Stubs and Driver
Top Down Testing
Bottom Up Testing
Test Types
Functional Testing
Non- Functional Testing
Structural Testing
Re-testing & Regression Testing
Static AND Dynamic Techniques
Static Technique
Dynamic Technique
Static Analysis by Tools
White Box Techniques
Statement Coverage Testing
Branch Coverage Testing
Decision Coverage Testing
Path Coverage
Black Box Techniques
Equivalence Partitioning
Boundary Value Analysis
Decision Table testing
State Transition testing
Experience Based TestingTechniques
Random Testing
Exploratory Testing
Error Guessing
Functional Testing
Integration Testing
Unit Testing
System Testing
Smoke testing
Sanity testing
Regression Testing
Usability Testing
Security Testing
User Acceptance Testing
White Box & Black Box Testing
Globalization & Localization Testing
Non Functional Testing
Compatibility testing
Endurance testing
Load testing
Performance testing
Recovery testing
Scalability testing
Stress testing
Volume testing
Test Planning and Estimation
Test Planning
Test Strategies Vs Test Plan
Test Approaches
Risk and Testing
Product Risks
Project Risks
Defect Management
Defect LifeCycle
Severity Vs Priority