Counting state transition tests for a door lock

A keypad door controller has three states: Locked, Unlocked and Alarmed. It reacts to five events: correct PIN, wrong PIN, lock button, timeout and reset. The specification defines exactly these transitions:

  • Locked + correct PIN goes to Unlocked.
  • Locked + wrong PIN goes to Alarmed.
  • Unlocked + lock button goes to Locked.
  • Unlocked + timeout goes to Locked.
  • Alarmed + reset goes to Locked.

Any other state–event pair must be ignored, leaving the state unchanged. The controller always powers up in Locked.


A state diagram with three states, Locked, Unlocked and Alarmed, joined by arrows labelled with the events that cause each transition.


Give each answer as a whole number: the number of single-event tests needed to exercise every valid transition once, the number of state–event pairs that must be tested as ignored events, and the fewest events in one sequence, starting from Locked, that exercises every valid transition at least once.

Your answers

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Black-Box Testing Questions: