Branch Coverage Testing

Branch coverage testing is a methodical type of testing which requires that all program branches or conditional states be tested at least once during a testing process.

In branch coverage testing, each different outcome from a code module is tested. For example, if the outcomes are binary, developers test both outcomes. Likewise, if there is a code function that tests a range of values, each of those valued outcomes are tested. If a function returns either a yes or a no value, the test must input each of these values and test the result.

By nature, branch coverage testing is different than other broader forms of testing. It represents a rigid conditional requirement that may not be entirely feasible in all cases. Some developers and others that talk about branch coverage testing suggest that a certain percentage of coverage is adequate, while others have noted that developers may work up two or three different testing strategies to ensure that they cover all code module branches - or as many as possible.

As a type of tactical testing, branch coverage testing is more of a metric used to gauge testing outcomes than a testing philosophy or broader-based testing strategy idea.

Post a Comment

0 Comments