Modern QA2026State Transition Diagrams — tiles
Log inJoin
12 / 71 · 11 Manual Testing Fundamentals · Test Design Techniques← prev⊞ allnext →☰ Read as one page

2.5State Transition Diagrams

Model features that have distinct states and transitions between them. State transition testing ensures that the system correctly moves between states and blocks invalid transitions.

Drawing the Diagram

[Draft] --submit--> [Pending Review] --approve--> [Published]
                                      --reject---> [Draft]
[Published] --archive--> [Archived]
[Archived] --restore---> [Draft]

Deriving Test Cases

From the diagram above, derive test cases for:

Valid transitions (positive tests):

  • Draft -> Pending Review (submit)
  • Pending Review -> Published (approve)
  • Pending Review -> Draft (reject)
  • Published -> Archived (archive)
  • Archived -> Draft (restore)

Invalid transitions (negative tests):

  • Draft -> Published directly (should be blocked)
  • Archived -> Published directly (should require going through Draft first)
  • Published -> Draft (should require archiving first)
  • Pending Review -> Archived (should be blocked)

Transition loops:

  • Draft -> Pending -> Draft -> Pending -> Published (rejection loop works correctly)

State coverage:

  • Every state is reached at least once
  • Every transition is exercised at least once

State Transition Table Format

Current State Event Next State Action
Draft Submit Pending Review Send notification to reviewer
Pending Review Approve Published Make visible to public
Pending Review Reject Draft Send rejection reason to author
Published Archive Archived Remove from public view
Archived Restore Draft Return to author for editing