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 questions1-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.
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.
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).
Keep practicing
Take the free ISTQB-ATTA practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other ISTQB-ATTA practice questions
- Question 3Which additional set of test cases is needed to achieve both 100% statement coverage and …
- Question 4How many test cases are needed to test code fragment lines 26 – 32 to achieve 100% condit…
- Question 6It has been suggested to organize a performance test to find out more regarding the third…
- Question 7To address reliability a number of measures will be taken throughout the development and …
- Question 8A developer has spent three days looking at a system that crashes now and then. The probl…
- Question 10What is the value of statement coverage achieved by test case 1 from test set A? 2 credit…
