State Transition Testing
Test what happens when a thing changes state.
What you'll learn
- Name states and events.
- Draw allowed moves.
- Test valid and invalid paths.
Manual QAlessonsJump to another lesson
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.
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
Start state
The object begins in one place.
- 2
Event happens
A user or system action fires.
- 3
New state
The object moves if the rule allows it.
- 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 fieldsQuick Check
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
Few, stable
Profile page
Many, stable
Cart during browsing
Few, churn
Rare admin flow
Many, churn
Live game lobby