What is Branch Testing?

Branch Testing is the testing in which all the branches included in the program source code are tested at least once.
Branch testing is also known as the structural or white box testing because it is only related with the source code and not with the internal working of application. Branch testing is also known as the decision testing.

In this branch testing each and every statement of the code is executed at least once. In Branch testing all the branches in the source code are validated so that any abnormal behavior of branch should not stop the working of an application.

Decision testing includes loop statement, CASE statement, IF statement where there are two or more outcomes, the outcomes can be true or false.

How to calculate the Branch/Decision coverage?

To calculate decision coverage find out the minimum number of paths covering all the edges.

Formula:

Branch Testing = (Number of decision outcomes tested / Total number of decision outcomes) x 100 %

Example:


what is branch testing in software testing istqb

Read x
Read y
If x + y > 20 THEN
Print “x + y is large”
EndIf
If x>10
Print “x is large”
EndIf

Consider the above given example.

The Branch coverage is:
1. 1x-2z-3u-4s-5T
2. 1x-2y-4V

Share This:
Facebooktwittergoogle_plusredditpinterestlinkedintumblr