nerdexam
iSQI

CTAL-TTA_001 · Question #51

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

The correct answer is C. 8. 1-switch coverage requires testing every valid pair of consecutive transitions - i.e., every sequence of two back-to-back transitions that can occur in the state diagram. Based on the referenced diagram, there are exactly 8 such valid transition pairs, making C (8) correct. Why…

Structure-Based Testing

Question

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

Options

  • A5
  • B7
  • C8
  • D9

How the community answered

(64 responses)
  • A
    6% (4)
  • B
    13% (8)
  • C
    78% (50)
  • D
    3% (2)

Explanation

1-switch coverage requires testing every valid pair of consecutive transitions - i.e., every sequence of two back-to-back transitions that can occur in the state diagram. Based on the referenced diagram, there are exactly 8 such valid transition pairs, making C (8) correct.

Why the distractors are wrong:

  • A (5) likely reflects 0-switch coverage, which only requires covering each individual transition once - a weaker criterion.
  • B (7) is a common miscounting error, typically from overlooking a transition pair where a state loops back on itself or shares an incoming and outgoing transition.
  • D (9) over-counts by including invalid or impossible transition sequences - pairs that cannot actually occur consecutively in a valid path through the diagram.

Memory tip: Think of the "switch number" as the number of transitions between transitions. 0-switch = cover single transitions. 1-switch = cover every pair of transitions (one handoff between states). The test case count equals the number of valid 2-step paths, not the number of states or total transitions.

Topics

#state transition testing#switch coverage#test case count#state diagram

Community Discussion

No community discussion yet for this question.

Full CTAL-TTA_001 Practice