What is Branch Coverage or Decision Coverage? Its advantages and disadvantages

Branch coverage is also known as Decision coverage or all-edges coverage. It covers both the true and false conditions unlikely the statement coverage.

  • A branch is the outcome of a decision, so branch coverage simply measures which decision outcomes have been tested. This sounds great because it takes a more in-depth view of the source code than simple statement coverage
  • A decision is an IF statement, a loop control statement (e.g. DO-WHILE or REPEAT-UNTIL), or a CASE statement, where there are two or more outcomes from the statement. With an IF statement, the exit can either be TRUE or FALSE, depending on the value of the logical condition that comes after IF.

[Read more…]