QuestionQ6

VerifiedChapter 4: Test Analysis and Design

An anti-intrusion system is battery powered and is activated by pressing its only available button. To deactivate the system, the operator must enter a PIN code. The system remains in alert mode for a configurable timeout, and an alarm bell rings if it is not deactivated before the timeout expires. The following state-transition diagram describes the system behavior:

Question Image

What is the minimum number of test cases required to cover every unique sequence of exactly 4 states / 3 transitions that starts and ends in the “Inactive” state? (Note that “Inactive” is not a final state in the diagram.)

Explanation

Exactly two distinct three-transition paths start at Inactive and return to Inactive: Inactive → Active → Active → Inactive, and Inactive → Active → Alert Mode → Inactive. No other route can reach Inactive within the required three transitions.

Community Discussion

No comments yet. Be the first to start the discussion!