IQ.IV · ISTQB CTFL practice question

Using the same pseudocode from the previous question (lines 1–7), what is the minimum number of test cases required to achieve 100% branch coverage?

Choose one answer
Check answer and explanation

Correct answer: 2 test cases (for example, x = 11 and x = -5)

Explanation

There are two conditional decisions (line 2 and line 5), each with a true and false branch. x = 11 takes both true branches (line 2 true, line 5 true), and x = -5 takes both false branches (line 2 false, line 5 false), exercising all 4 branches in 2 test cases.

Common trap

There are two conditional decisions (line 2 and line 5), each with a true and false branch.

Source: Original unofficial practice; not an official ISTQB exam item
Checked against the cited text on 2026-11-30.

Report an error in this question