Free practice tool

State transition testing practice

Read state diagrams, fill in state tables, follow event sequences and count coverage. Every problem is a different machine.

Tip: repeating the same transition in a test does not raise coverage. Count each different transition once.

The idea in a minute

State transition testing is for systems whose response to an event depends on their current state and what happened before: a sign-in that locks after three failures, an order that moves from paid to shipped. A state diagram shows states, and arrows for transitions labelled with the event that causes them.

A state table lists every state and event pair. Cells with a transition show the next state; all other cells are invalid pairs, which make good negative tests. Transition coverage is the share of valid transitions your tests have exercised.

How to work a problem

Find the current state, then look for an arrow leaving it with the event. No arrow means the event is not allowed in that state.

Ready for a whole exam?

Practice on the real exam screen with full CTFL 4.0 practice exams. Your first one is free.