How to turn business rules with several conditions into a simple table, collapse it, derive test cases from it, and use it to find gaps and contradictions in requirements.
beginner Mobile & web
Short on time? Switch to the quick version.
Your progress
A food delivery app launches two features in the same sprint: free delivery for members on orders of €30 or more, and a €1 surcharge on rainy days. Both are tested separately, both pass. On the first rainy Saturday, the support team is flooded: members with big orders are being charged €1 for “free” delivery. Is that a bug? Nobody knows, because nobody ever decided what happens when both rules apply at once.
That missing decision would have been obvious in five minutes with a decision table.
Use a decision table when the outcome depends on two or more conditions together: discounts, fees, eligibility, permissions, login and security rules. If you catch yourself reading “if… and… unless…”, draw a table.
When to use a decision table
Decision tables shine when several conditions combine to decide one outcome. Typical places in mobile and web apps:
Prices and fees: delivery fees, discounts, shipping, surcharges, loyalty rewards.
Eligibility: loan or credit card approval, free trials, age-restricted content.
Business workflows: whether an order can be canceled, refunded or changed.
They’re not the best tool when there’s only one input (use equivalence partitioning and boundaries), or when the outcome depends on the order of events, like an order moving from “placed” to “delivered” (use state transition testing).
Check this part
When is a decision table the right tool?
Decision tables handle combinations of conditions. For a single input, equivalence partitioning and boundary value analysis are the better fit.
What does one column in a decision table describe?
Each column is one rule: "if these conditions are true, do this". You can turn each column straight into a test.
A grid of every combination of conditions and the action for each, for rules where several conditions decide one outcome.
Part Not started
Building a decision table
List the conditions. Things that can be true or false and change the outcome (member? order ≥ €30? rainy day?).
List the actions. What the system does (charge a fee, show an error, log in).
Write every combination. With n yes/no conditions you get 2ⁿ columns: 2 conditions → 4, 3 → 8, 4 → 16.
Fill in the action for each column from the requirement. If you can’t, you’ve found a gap.
Collapse. When two columns have the same action and differ in only one condition, that condition doesn’t matter there: merge them and write ”–” (don’t care).
Turn each column into a test case.
For example, in the login table above the two columns with an unregistered email both end in “Error” and differ only in “Password correct?”, so they merge:
Conditions
R1
R2
R3
Email registered?
Y
Y
N
Password correct?
Y
N
–
Actions
Result
Log in
Error
Error
Collapsed: 4 rules became 3. “–” means any value gives the same result.
Building one step by step: login with 2FA
The requirement for a banking app:
“Users log in with email and password. If the email or password is wrong, show Incorrect email or password. If both are correct and the user has two-factor authentication (2FA) turned on, ask for the 6-digit code. If 2FA is off, log the user straight in.”
Step 1: list the conditions
Read the requirement and underline everything that can be true or false and changes what happens:
Is the email registered?
Is the password correct?
Is 2FA turned on for the account?
Things like “the phone is in dark mode” don’t change the outcome, so they’re not conditions here.
Step 2: list the actions
What can the system do? Show the error, ask for the 2FA code, or log the user in.
Step 3: count and write every combination
Each yes/no condition doubles the number of combinations, so 3 conditions give 2 × 2 × 2 = 2³ = 8 rules. A simple trick to write them all without missing any: in the first row, write half Y then half N (YYYY NNNN); in the second, alternate in pairs (YY NN YY NN); in the last, alternate one by one (Y N Y N…).
Step 4: fill in the actions
Go column by column and ask “according to the requirement, what happens here?”
Conditions
R1
R2
R3
R4
R5
R6
R7
R8
Email registered?
Y
Y
Y
Y
N
N
N
N
Password correct?
Y
Y
N
N
Y
Y
N
N
2FA on?
Y
N
Y
N
Y
N
Y
N
Actions
Show error
✓
✓
✓
✓
✓
✓
Ask for 2FA code
✓
Log in
✓
The full table: 8 rules. Six of them end in the same error.
Step 5: collapse the table
Six columns end in “Show error”. Do we need six tests? Look at R3 and R4: same action, and they differ only in “2FA on?”. So 2FA doesn’t matter when the password is wrong: merge them into one column with ”–” (don’t care) for 2FA. Repeat until no two columns can be merged:
Conditions
R1
R2
R3
R4
Email registered?
Y
Y
Y
N
Password correct?
Y
Y
N
–
2FA on?
Y
N
–
–
Actions
Show error
✓
✓
Ask for 2FA code
✓
Log in
✓
Collapsed: 8 rules became 4. “–” means any value gives the same result.
The merge rule is simple: same actions, and exactly one condition different. Never merge columns with different actions; their difference is the whole point. If you end up with more columns than you expected, try merging in a different order.
“Applicants under 18 are always rejected. Adults with a credit score of 650 or higher are approved instantly. Adults with a lower score go to manual review if they have a regular income, and are rejected if they don’t.”
After collapsing:
Conditions
R1
R2
R3
R4
18 or older?
Y
Y
Y
N
Score ≥ 650?
Y
N
N
–
Regular income?
–
Y
N
–
Actions
Decision
Approve
Review
Reject
Reject
8 combinations collapse to 4 rules. The under-18 rule ignores everything else.
Real rules are often less tidy. If the bank later adds “scores from 600 to 649 get a lower credit limit”, the score is no longer yes/no: it has three ranges. You can still use a decision table, with a row whose values are ranges (< 600, 600–649, ≥ 650) instead of Y/N. This is sometimes called an extended-entry table. The number of columns is then the product of the number of values per condition (here 2 × 3 × 2 = 12).
Check this part
A rule depends on four yes/no conditions. How many columns does the full decision table have?
Each yes/no condition doubles the combinations: 2⁴ = 2 × 2 × 2 × 2 = 16.
Two columns have the same action and differ only in "Rainy day?". What can you do?
Same action and exactly one different condition means that condition doesn't matter there, so the columns merge into one with a don't-care.
List conditions and actions, write all 2ⁿ combinations, fill in the actions, collapse, and turn each column into a test.
Part ProNot started
Spotting missing and contradictory rules
Decision tables make missing rules (a combination that no rule covers) and contradictory rules (two rules that both apply but say different things: is a member’s free delivery still free when the rainy-day surcharge applies?) jump out. Finding those before coding is one of the cheapest bug fixes there is.
When you find a gap or a conflict, don’t decide yourself: raise it with the product owner (or whoever wrote the requirement).
Example: a delivery fee
Back to the rainy Saturday. The requirement:
“Delivery normally costs €3.99. Members get free delivery on orders of €30 or more, and pay €1.99 on smaller orders. On rainy days, a €1.00 surcharge is added to every order.”
Conditions
R1
R2
R3
R4
R5
R6
R7
R8
Member?
Y
Y
Y
Y
N
N
N
N
Order ≥ €30?
Y
Y
N
N
Y
Y
N
N
Rainy day?
Y
N
Y
N
Y
N
Y
N
Actions
Delivery fee
€1.00
€0.00
€2.99
€1.99
€4.99
€3.99
€4.99
€3.99
R1 is the combination nobody discussed: is free delivery still free when it rains?
Two things stand out:
R1 needs a decision. Read literally (“every order”), a member’s free delivery costs €1 on rainy days. “Free delivery” and “a surcharge on every order” pull in different directions: that’s a conflict. Maybe the €1 is intended, maybe not. A tester’s job is to ask before release, not guess.
Only two pairs collapse. For non-members, the order size doesn’t matter (R5 = R7, R6 = R8), so 8 columns become 6. Rain matters in every rule, so it can never be ”–”. Not every table shrinks much, and that’s fine.
This is the hidden superpower of decision tables. Because you’re forced to fill in every column, two kinds of requirement bugs become impossible to miss:
Problem
What you notice
Example
Gap (missing rule)
A column where no rule says what happens
“Free cancellation before the restaurant accepts” and “€2 fee after accepting” — but what about after the courier picks up?
Conflict (contradiction)
A column where two rules apply and disagree
“Not enough money → Insufficient funds” and “Face ID fails → ask for PIN”: what if both are true?
Every extra condition doubles the table. With 10 conditions you’d have 1,024 columns. Then teams use risk to pick the important ones, or pairwise testing, which covers every pair of values with far fewer tests.
The number of columns doubles with every yes/no condition:
Conditions
Combinations
3
8
5
32
10
1,024
20
over 1 million
This is called combinatorial explosion. Ways to handle it:
Collapse with don’t-cares, as above.
Split the rule into smaller, independent tables (fees in one, eligibility in another).
Prioritize by risk: test the combinations that involve money, security or the most users first.
Pairwise testing: instead of every combination, choose a small set of tests in which every pair of condition values appears at least once (for 10 yes/no conditions, a handful of tests instead of 1,024).
Common mistakes
Mixing up conditions and actions. “Show an error” is something the system does, not a condition.
Missing a combination. Use the YYYY NNNN / YY NN / Y N pattern so you never skip one.
Merging columns with different actions. Only merge when the actions are identical.
Guessing to fill a gap. An empty column is a question for the team, not for your imagination.
Testing only one value for ”–”. Fine for low-risk rules; for payments and security, add the risky value too.
Check this part
A rule has 12 yes/no conditions. Why might the team use pairwise testing instead of a full decision table?
With 12 conditions the full table has 2¹² = 4,096 columns. Pairwise testing makes sure each pair of values appears together at least once, using a small fraction of the tests.
A rule has 10 yes/no conditions. Roughly how many columns does the full table have?
Every extra condition doubles the table: 2¹⁰ = 1,024. That's why big rules need risk-based selection or pairwise testing.
Every extra condition doubles the table, so teams collapse, split, prioritize by risk or use pairwise testing.
The rest of this lesson is in Bugwise Pro
The last parts of every lesson are part of Bugwise Pro. Sign in to unlock them if you have it.
Pick a requirement, find the conditions, fill in every rule, collapse the table, and watch the test cases appear.
🧮 Decision-table builder
Turn a business rule into a table, and the table into test cases, in four steps.
RequirementUsers log in with email and password. If the email or password is wrong, show “Incorrect email or password”. If both are correct and the user has two-factor authentication (2FA) turned on, ask for the 6-digit code. If 2FA is off, log the user straight in.
Step 1. Which of these are conditions (inputs that can be true or false and change the outcome)? Leave out actions (what the system does) and things that don’t matter.
Decision tables don’t just produce tests. They expose holes in requirements. In each round, decide for every column whether the requirement covers it.
🔍 Find the gap
Each requirement is laid out as a full decision table. For every column, decide: is it covered by a rule, impossible, a gap (no rule says what happens) or a conflict (two rules disagree)?
Food delivery: canceling an order
R1. Customers can cancel for free while the restaurant hasn’t accepted the order.
R2. If the restaurant has accepted the order but the courier hasn’t picked it up yet, canceling costs a €2.00 fee.
Column 1
Restaurant accepted?
Y
Courier picked up?
Y
Column 2
Restaurant accepted?
Y
Courier picked up?
N
Column 3
Restaurant accepted?
N
Courier picked up?
Y
Column 4
Restaurant accepted?
N
Courier picked up?
N
Give every column a verdict to check.
Practice: free checked bag
Build a decision table for this airline app rule, collapse it, and write down the test cases. Then compare with the answer.
“Business class passengers always get a free checked bag. Economy passengers get one free if they are Gold members or if the flight is longer than 6 hours. Otherwise, a checked bag costs €35.”
Show the answer
Three conditions (Business class? Gold member? Flight over 6 hours?) give 2³ = 8 combinations. All four Business columns are free, so they collapse to one. For Economy, Gold members are free whatever the flight length.
Conditions
R1
R2
R3
R4
Business class?
Y
N
N
N
Gold member?
–
Y
N
N
Flight > 6h?
–
–
Y
N
Actions
Checked bag
Free
Free
Free
€35
That’s 4 test cases. Good extra ideas: test a flight of exactly 6 hours (“longer than 6 hours” means 6:00 should cost €35, a boundary worth confirming), and ask the team whether a Gold member in Business gets a second free bag. The rule doesn’t say, so it’s a question, not an assumption.
Decision table checklist
0 of 8 checked
Key takeaways
Use a decision table when several conditions combine to decide an outcome: fees, discounts, eligibility, login and permission rules.
Build it in order: conditions → actions → all 2ⁿ combinations → fill in actions → collapse → test cases.
Merge two columns only when they have the same actions and differ in exactly one condition; that condition becomes ”–” (don’t care).
Every remaining column is one test case. For risky ”–” values, test the riskier option too.
An empty column is a gap, two disagreeing rules are a conflict: both are requirement bugs worth raising early.
Tables explode with many conditions; collapse, split, prioritize by risk, or use pairwise testing.
Finished this page?Nice work, this page is complete!
Mark it as done to track your progress. It's saved in this browser, no account needed.