nerdexam
ISTQB

CTFL18 · Question #189

How many test cases are necessary to cover all the possible sequences of statements (paths) for the following program fragment? Assume that the two conditions are independent of each other : -if…

The correct answer is A. 2 Test Cases. See the full explanation below for the reasoning.

Question

How many test cases are necessary to cover all the possible sequences of statements (paths) for the following program fragment? Assume that the two conditions are independent of each other : -if (Condition 1)then statement 1else statement 2if (Condition 2)then statement 3

Options

  • A2 Test Cases
  • B3 Test Cases
  • C4 Test Cases
  • DNot achievable

How the community answered

(31 responses)
  • A
    71% (22)
  • B
    19% (6)
  • C
    6% (2)
  • D
    3% (1)

Community Discussion

No community discussion yet for this question.

Full CTFL18 Practice