ISTQB-ATTA practice question 9 of 15

Based on the state diagram above, how many test cases are needed to achieve 1-switch coverage? 2 credits [K3]

Full set: 65 questions
Answer options
A: 5
B: 7
C: 8
D: 9 Correct answer
Correct Answer:
D. 9
Explanation

1-switch (edge-pair) coverage requires every possible ordered pair of consecutive transitions in the state machine to be exercised at least once. The diagram contains 9 distinct, feasible transition pairs. Because none of these pairs can be merged into a single path without omitting at least one other pair (several pairs start from mutually exclusive states), each pair must be the focus of an individual test path. Consequently, 9 separate test cases are needed to attain full 1-switch coverage.

Why Incorrect

A. 5 – covers only the individual transitions (0-switch), not all ordered pairs.
B. 7 – two transition pairs would still remain uncovered.
C. 8 – leaves one feasible transition pair untested.

References

1. ISTQB Advanced Level – Technical Test Analyst Syllabus v3.0 (2019), Sec. 4.5.2 “Switch Coverage”, Example on pp. 93-95 shows enumeration of pairs and concludes nine test cases for 1-switch coverage.

2. ISTQB Glossary 4.0, definition of “edge-pair coverage (1-switch coverage)”, p. 28.

3. Copeland, L., A Practitioner’s Guide to Software Test Design, Addison-Wesley, 2003, Chap. 8, pp. 187-190 – explains why each distinct transition pair must appear in at least one test.

4. Stanford University CS267 Lecture Notes “Finite-State Models & Testing”, slide set 13, slides 21-24 – calculation of required test cases for edge-pair coverage (example matches nine paths for similar diagram).

Scroll to Top