Great work!

XP to next level

BugEater

Module 4: State Transition Testing

Advanced Manual QA 104 XP 59 min

Updated: 07/07/2026

Start Module

An order cannot be shipped if it has been cancelled. A cancelled subscription cannot be renewed directly without reactivating. A sold item cannot be equipped without being repurchased. These constraints sound obvious in a meeting — and yet developers fail to enforce them all the time.

State transition testing is the discipline of making object life cycles explicit, testable, and provably complete.

Lessons in this module

  1. Objects Have a Life Cycle — Introduction to state machines: what states are, what transitions are, and why every non-trivial entity in a system has a state model worth testing. Build your mental model with real examples from e-commerce, task management, and user accounts.
  2. Valid vs. Invalid Transitions — The state table: a matrix of current states vs. events, mapping each cell to either a valid next state or a rejection. Learn to identify which invalid transitions are tested vs. which are just assumed to "never happen."
  3. Reading and Drawing State Diagrams — Learn the notation: circles for states, arrows for transitions, labels for events and guards. Practice reading existing diagrams and drawing your own from a written specification.

Practice: RPG Inventory Status

An item can be Equipped, Unequipped, or Sold. Some transitions are valid; two are bugs. Your job: find the forbidden path from Sold to Equipped — and any other invalid transition the backend failed to block.

By the end of this module, you will earn the State Machine Shepherd badge.

Module content