Branch Coverage Testing

What Does Branch Coverage Testing Mean?

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.

Advertisements

Techopedia Explains Branch Coverage Testing

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.

Advertisements

Related Terms

Margaret Rouse

Margaret is an award-winning technical writer and teacher known for her ability to explain complex technical subjects to a non-technical business audience. Over the past twenty years, her IT definitions have been published by Que in an encyclopedia of technology terms and cited in articles by the New York Times, Time Magazine, USA Today, ZDNet, PC Magazine, and Discovery Magazine. She joined Techopedia in 2011. Margaret's idea of a fun day is helping IT and business professionals learn to speak each other’s highly specialized languages.