Decision Table vs State Transition Testing
The short answer
A decision table models combinations of conditions that all hold at the same moment; a state transition model captures how the system moves between states as events arrive in sequence - so if reordering the same inputs would change the outcome, you need a state model.
These are two of the four K3 black-box techniques in chapter 4, and on the page they look alike: both hand you a structure and ask for a count. Candidates who confuse them usually do so because both were taught as 'the one with the table', and both produce a number that looks like an answer.
The distinction is not about complexity or about how many inputs there are. It is about whether time is part of the model. A decision table has no notion of before or after; a state machine is nothing but before and after.
Side by side
| Decision table testing | State transition testing | |
|---|---|---|
| What it models | Combinations of conditions holding at one moment | How the system moves between states as events arrive |
| Does order matter | No | Yes - it is the whole point |
| The structure you are given | Conditions and actions as rows; each column is one rule | States, events, and the transitions between them |
| What you count | Columns - 2 to the power of the number of binary conditions, before simplification | Transitions - all valid ones for 0-switch coverage |
| Three binary conditions gives | 8 columns in the full table | Not applicable |
| 5 states and 7 valid transitions gives | Not applicable | 7 transitions to exercise for 100% valid transition coverage |
| Typical trap | Simplifying the table before you were asked to | Counting states instead of transitions, or assuming 0-switch covers invalid transitions - it does not; that is all transitions coverage |
How to tell which one the question wants
Run these on the stem before you count anything. The first that matches settles it.
- 1Ask whether the same inputs in a different order would behave differently. If yes, it is a state model. If the outcome depends only on which conditions are true together, it is a decision table.
- 2Look for the vocabulary. States, events, transitions and a start state mean a state model. Conditions, actions, rules and combinations mean a decision table.
- 3For a decision table, count columns as 2 to the power of the number of binary conditions unless the question says the table has been simplified. Collapsing rules before you were asked to is the standard way to arrive at a number that is not on the answer sheet.
- 4For a state model, read which coverage is wanted. 0-switch, also called valid transition coverage, needs every valid transition exercised once - not every state visited, which is a weaker and different thing.
- 5Check whether invalid transitions are in scope. A question that asks about transitions the model forbids is asking for more than 0-switch coverage.
Working each one
A decision table is built by listing the conditions as rows and filling in one column for every combination of their values. With three independent binary conditions that is 2 to the power of 3, or eight columns, before any simplification. Simplification is legitimate - columns whose conditions cannot co-occur, or where a condition does not affect the outcome, can be collapsed - but it is a second step, and an exam question that has not asked for it wants the full table. Watch which number a question wants: 100% decision table coverage is measured over the feasible columns, not over all 2 to the power of n of them, so the full-table count and the coverage denominator are different numbers.
A state model is walked rather than filled in. Identify the start state first, then follow each event to the state it leads to. For 100% valid transition coverage, sometimes called 0-switch coverage, every valid transition must be exercised at least once. Note what this does not require: it does not require every state to be visited by a separate test, and it does not require any sequence longer than one transition. The syllabus's stronger criterion is all transitions coverage, which additionally requires the invalid transitions to be attempted; N-switch coverage is not in the v4.0 syllabus at all.
The most useful sanity check is to ask what a defect would look like. In a decision table the defect is a combination of conditions that produces the wrong action. In a state model the defect is usually a transition that exists when it should not, or one that leads somewhere unexpected - which is why the invalid transitions are so often where the marks are.
Worked exam questions
The answer and the reasoning are shown in full, including why each wrong option is wrong. These are drawn from the questions-and-answers page, so working them here does not spend the unseen pool the practice drills draw from.
1. A decision table has three independent binary conditions. How many rules does the table contain before any simplification?
K3- A.Eight
- B.Nine
- C.Three
- D.Six
Correct answer: A
Each of the three conditions has two outcomes, giving 2^3 = 8 combinations. Rules may then be collapsed where a condition is irrelevant.
2. A state model has 5 states and 7 valid transitions. How many transitions must be exercised to achieve 100% valid transition (0-switch) coverage?
K3- A.12
- B.7
- C.5
- D.35
Correct answer: B
0-switch (valid transition) coverage requires every valid transition in the model to be exercised at least once, so all 7.
Test your knowledge with real ISTQB-style questions
You’ve learned Decision Table vs State Transition Testing. Now sit a full 40-question paper and see if it holds up under the clock.
Or read questions with worked answers, or take a chapter-only practice drill.