Consider the following statements: 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. a)       ii is True; i, iii, iv & v are False

  2. b)       i & v are True; ii, iii & iv are False

  3. c)       ii & iii are True; i, iv & v are False

  4. d)       ii, iii & iv are True; i & v are False


Correct Option: D

AI Explanation

To answer this question, we need to understand the concepts of statement coverage, branch coverage, and decision coverage.

Statement coverage: It measures the percentage of statements in the code that have been executed during testing.

Branch coverage: It measures the percentage of branches (or decision points) in the code that have been executed during testing. A branch is a point in the code where there are multiple possible paths or choices.

Decision coverage: It measures the percentage of decision outcomes that have been executed during testing. A decision outcome refers to the different possible results of a decision point or branch.

Now let's go through each statement to determine if it is true or false:

i. 100% statement coverage guarantees 100% branch coverage. This statement is false. Although 100% statement coverage ensures that all statements have been executed, it doesn't guarantee that all branches have been covered.

ii. 100% branch coverage guarantees 100% statement coverage. This statement is false. While 100% branch coverage ensures that all branches have been executed, it doesn't guarantee that all statements have been covered.

iii. 100% branch coverage guarantees 100% decision coverage. This statement is true. If all branches have been executed, then all possible decision outcomes must have been covered as well.

iv. 100% decision coverage guarantees 100% branch coverage. This statement is false. Although 100% decision coverage ensures that all decision outcomes have been executed, it doesn't guarantee that all branches have been covered.

v. 100% statement coverage guarantees 100% decision coverage. This statement is false. While 100% statement coverage ensures that all statements have been executed, it doesn't guarantee that all decision outcomes have been covered.

Based on the explanations above, the correct answer is:

D) ii, iii & iv are True; i & v are False.

Find more quizzes: