Branch Coverage Definition
Branch coverage – is the metrics of testing under condition when all the branches of code base are under the tests by tests. Branches are one of the possible execution paths which can be chosen by code after the evaluation of decision operator.
For a team or an organization to know that an application has been tested to completeness, the point of definition that could be used is through branch coverage. So low branch coverage could mean that there are scenarios in an application that should not be tested to exist in a few of them. In such scenarios, it would be having the defects in it and they could be located only in very exceptional cases when the application is exercised.
High branch coverage means most of the decision points and conditional statements have been executed by the tests through the code. This would guarantee that the variety of program behaviors being tried under variety of conditions and reduce the probability of any bugs slip through the testing process. Though, the branch coverage should not be perceived as the panacea from all the defects. This kind of testing helps in achieving good testing coverage and hence good quality of the software, but it doesn’t mean that only those test cases can be considered.