ITPEC FE Morning April 2023 Question 49

Source exam: ITPEC FE Morning April 2023Topic: Software Development

ITPEC FE Morning April 2023 — Question 49 of 80

Decision Condition Coverage (Branch Coverage) — select test cases that cover both decision outcomes.

Condition: A OR B

Branch coverage requires that the decision (A OR B) evaluates to both True and False at least once.

  • A OR B = FALSE → both A and B must be False
  • A OR B = TRUE → at least one must be True

(c) covers both branches:

Test caseABA OR BBranch
1FalseFalseFALSEFALSE path
2TrueTrueTRUETRUE path

Why not others:
- (a) (False, True) → only TRUE branch covered; no FALSE branch

- (b) (False, True) and (True, False) → both give TRUE; FALSE branch never covered

- (d) Three test cases — covers both branches but is redundant; not the minimal set

Key rule: Branch coverage = every decision outcome (TRUE/FALSE) must occur at least once. For OR, getting FALSE requires all conditions to be False.

AI-generated — may contain errors

The original exam layout is preserved in the image so diagrams, formulas, tables, and code remain accurate.

This question comes from an official ITPEC past paper. ITPEC Practice is an independent study tool and is not affiliated with ITPEC. See the official FE past-paper collection or Report an issue.