Branch Coverage Testing

Why Trust Techopedia

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
Editor

Margaret jest nagradzaną technical writerką, nauczycielką i wykładowczynią. Jest znana z tego, że potrafi w prostych słowach pzybliżyć złożone pojęcia techniczne słuchaczom ze świata biznesu. Od dwudziestu lat jej definicje pojęć z dziedziny IT są publikowane przez Que w encyklopedii terminów technologicznych, a także cytowane w artykułach ukazujących się w New York Times, w magazynie Time, USA Today, ZDNet, a także w magazynach PC i Discovery. Margaret dołączyła do zespołu Techopedii w roku 2011. Margaret lubi pomagać znaleźć wspólny język specjalistom ze świata biznesu i IT. W swojej pracy, jak sama mówi, buduje mosty między tymi dwiema domenami, w ten…