State Transition Testing

Test what happens when a thing changes state.

Manual QA Module 4 Lesson 3
10 min read

What you'll learn

  • Name states and events.
  • Draw allowed moves.
  • Test valid and invalid paths.

State Transition Testing

Test what happens when a thing changes state.

Big Picture

One small picture can make this idea easier to hold.

Static view

  • Looks at one screen.
  • Misses movement.
  • Good for simple checks.
  • Does not show legal changes.

State machine

  • Shows movement.
  • Shows allowed steps.
  • Good for flows.
  • Shows bad transitions too.

VerdictState testing is best when the app changes over time.

How It Moves

Short steps make the flow easier to see.

List states

Write each valid state.

List events

Write what can happen.

3

Map moves

Connect each legal move.

Test paths

Walk through good flows and bad jumps.

Step By Step

This is the same idea, stretched across time.

  1. 1

    Start state

    The object begins in one place.

  2. 2

    Event happens

    A user or system action fires.

  3. 3

    New state

    The object moves if the rule allows it.

  4. 4

    Invalid path

    A bad move should fail in a clear way.

One Small Model

Think of this like a tiny card you can keep in your pocket.

State chart

5 fields
States:"Idle, open, paid"
Events:"Click, save, cancel"
Guards:"Rules that block moves"
Start:"The first state"
End:"The last state"
A chart shows what can move, and what cannot.

Quick Check

Question 1 of 10 correct

What do you test first in a state model?

Map It

One more picture helps you see where this lesson matters most.

State change map

State change
Churn

Few, stable

Profile page

Many, stable

Cart during browsing

Few, churn

Rare admin flow

Many, churn

Live game lobby

Stable
Few eventsMany events
Event count
More moving parts means more state tests.

Final Quiz

Question 1 of 30 correct

What is a state?