Example2 · White-Box Test Techniques
A C# method classifies a patient triage score. In pseudo-code: 1) read score; 2) IF score >= 8 THEN set level = 'red'; 3) IF score >= 4 THEN increment counter; 4) write level. There are 4 executable statements (lines 1-4). One test uses score = 9. How many executable statements are exercised, and what statement coverage results?
✓4 statements, giving 100% statement coverage
Correct. score = 9 is >= 8 and >= 4, so lines 1-4 all execute, giving 4/4 = 100%.
・3 statements, giving 75% statement coverage
Incorrect. With score = 9 both IF bodies run, so all four statements execute, not three.
・2 statements, giving 50% statement coverage
Incorrect. Two statements would leave both IF bodies unexecuted, which is not the case here.
・1 statement, giving 25% statement coverage
Incorrect. A single statement ignores that both conditions are true for score = 9.
Explanation
Statement coverage is executed statements divided by total executable statements. With score = 9 both guards (>= 8 and >= 4) are true, so all four statements run: 4/4 = 100%. Source: ISTQB CTAL-TTA v4.0 §2.2.
Example3 · Static and Dynamic Analysis
Control flow analysis of a motor-control component produces a strongly connected control flow graph with 14 edges and 11 nodes. Using McCabe's formula V(G) = E - N + 2 for a single-component graph, what is the cyclomatic complexity?
・Three
Incorrect. This underestimates the value from E - N + 2.
・Four
Incorrect. This is one less than the correct computation.
・Six
Incorrect. This overestimates the value from E - N + 2.
✓Five
Correct. V(G) = 14 - 11 + 2 = 5, the number of independent paths.
Explanation
Cyclomatic complexity is a positive integer representing the number of independent paths in a strongly connected graph. With E=14 edges and N=11 nodes, V(G) = E - N + 2 = 14 - 11 + 2 = 5. Source: ISTQB CTAL-TTA v4.0 §3.2.1.
Example4 · Quality Characteristics for Technical Testing
Writing the test plan for a parcel-tracking system's reliability test, the team sees that the only realistic data is production data holding customers' home addresses. Analyzing the constraints, which planning action is most appropriate?
✓Plan to make the test data anonymous before use
Correct. Data protection rules mean production-based test data must be made anonymous, planned as part of implementation.
・Copy the production data straight into the shared test bed
Incorrect. Copying real personal data into a test bed breaches data protection and is not acceptable.
・Share the address file with every tester by email
Incorrect. Emailing the address file spreads personal data further and worsens the problem.
・Abandon reliability testing to avoid the data
Incorrect. Dropping reliability testing sacrifices a needed quality characteristic instead of handling the data.
Explanation
Data protection policies and laws may preclude using production data such as personal data; making test data anonymous is a non-trivial task planned as part of test implementation. Source: ISTQB CTAL-TTA v4.0 §4.2.5.
Example5 · Reviews
A Technical Test Analyst is about to review an integration test plan for a government data-exchange hub. Beyond reading the plan itself, what does the syllabus say a good review must also consider?
✓Its interaction with other items elsewhere in the wider system
Correct. A review is not isolated; it must also consider the item's interaction with other system items.
・The personal reading preferences of the plan's original author
Incorrect. Author preferences are not a factor a good review is meant to assess.
・The seating plan for the upcoming project review meeting
Incorrect. The meeting seating plan is logistics, not part of what the review considers.
・The final delivery budget agreed by the senior management board
Incorrect. Setting the delivery budget is not a purpose of the review.
Explanation
A review is not isolated to the work product being reviewed; it must also consider the interaction of that item with other items in the system, so when reviewing an integration test plan the reviewer also considers the items being integrated. Source: ISTQB CTAL-TTA v4.0 §5.1.