What is State Transition Testing?
State transition testing is a test design technique for systems that behave differently depending on their current state, modeling the states, the events that trigger transitions, and the resulting states, then deriving tests that exercise valid and invalid transitions.
Free to start · 7-day trial on paid plans
In depth.
Many features are state machines: an order moves through Placed, Paid, Shipped, Delivered, Cancelled; a login form moves through Logged Out, Logging In, Logged In, Locked. The same action produces different results depending on the current state, you cannot ship an order that has not been paid. State transition testing makes that explicit by drawing a state diagram (or state table) of states, events, and transitions.
From the model you derive tests: valid transitions (each allowed event from each state reaches the right next state), invalid transitions (events that should be rejected in a given state, like cancelling an already-delivered order), and often sequences of transitions. A state transition table is useful for spotting missing or undefined transitions, gaps in the model that are frequently real bugs.
This technique catches a class of defects that single-action testing misses: order-dependent and state-dependent behavior. It is part of the ISTQB syllabus and especially relevant to workflows, protocols, UI flows, and anything with a lifecycle.
Why interviewers ask about this.
State transition testing is a named technique interviewers expect for systems with states and lifecycles. Explaining how you model states and transitions, and test both valid and invalid transitions, shows you can handle order-dependent behavior.
Example scenario.
Testing an order lifecycle, the tester builds a state transition diagram and tests both valid transitions (Paid to Shipped) and invalid ones (Cancelled to Shipped). The invalid-transition tests reveal a bug: a cancelled order can still be marked shipped because the code never checks the current state.
Interview tip.
Mention modeling states, events, and transitions (a diagram or table), and that you test valid transitions, invalid transitions, and sometimes sequences. Calling out invalid-transition testing, where the real bugs often hide, is the strong signal.
Frequently asked questions.
When should you use state transition testing?
Use it for systems whose behavior depends on their current state, order lifecycles, login flows, protocols, workflows, anything with a lifecycle where the same action behaves differently in different states.
What kinds of tests does state transition testing produce?
Tests for valid transitions (each allowed event reaches the correct next state), invalid transitions (events that should be rejected in a given state), and sometimes sequences of transitions. Invalid-transition tests often catch the most bugs.
Related Terms
Explore related glossary terms to deepen your understanding.
Related Resources
Dive deeper with these related interview prep pages.
Free QA career tools, no account needed
Instant and private, everything runs in your browser. Try them before you sign up.
QA Resume Checker
Instant 0-100 score on automation keywords, impact, and ATS formatting.
QA Cover Letter Generator
A tailored 3-paragraph QA cover letter from your resume and a job post.
QA Application Tracker
Drag-and-drop kanban to track every QA application from Applied to Offer.
QA Take-Home Test Generator
A realistic take-home assignment with a scenario, tasks, and a rubric.
QA LinkedIn Headline Generator
A recruiter-searchable headline, About section, and skills list.
QA STAR Story Builder
Structure a QA behavioral answer with the STAR method and instant checks.
QA Bug Report Generator
Build a clean, reproducible bug report for Markdown, Jira, or plain text.
Boundary Value Analysis Generator
Generate boundary value and equivalence partitioning test cases from a range.
QA Metrics Calculator
Calculate DRE, defect leakage, defect density, and pass rate with interpretation.
QA Test Plan Generator
Build a structured test plan (scope, approach, criteria, risks) in Markdown.
Ready to Ace Your QA Interview?
Practice explaining state transition testing and other key concepts with our AI interviewer.
Join 1,200+ QA engineers already practicing with AssertHired.
Start your free QA interview