Skip to main content
Testing Fundamentals
DEFINITION

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

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 IT MATTERS

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

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.

TIP

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.

FAQ

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 Resources

Dive deeper with these related interview prep pages.

FREE TOOLS  /  no signup

Free QA career tools, no account needed

Instant and private, everything runs in your browser. Try them before you sign up.

EXEC.NOW

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
FREE.TO.START  ·  7.DAY.TRIAL ON PAID PLANS
Written by Aston Cook, Senior QA EngineerLast updated May 2026