Multiple choice technology testing

Choose the true statements from the following, i. 100% statement coverage guarantees 100% branch coverage. ii. 100% branch coverage guarantees 100% statement coverage. iii. 100% branch coverage guarantees 100% decision coverage. iv. 100% decision coverage guarantees 100% branch coverage. v. 100% statement coverage guarantees 100% decision coverage.

  1. Only ii & iii are true

  2. Only ii & iv are true

  3. Only iii & iv are true

  4. Only ii, iii & iv are True

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Branch coverage guarantees statement coverage because executing all branches requires executing all statements in those branches. Decision coverage is equivalent to branch coverage. Statement coverage alone doesn't guarantee branch coverage since you can execute all statements without taking both branches in every conditional.