11 / 71 · 11 Manual Testing Fundamentals · Test Design Techniques← prev⊞ allnext →☰ Read as one page
2.4Decision Tables
When business logic involves combinations of conditions, a decision table ensures full coverage. Each column represents a unique combination of conditions and its expected outcome.
Building a Decision Table
- List all conditions (inputs/states)
- List all actions (outputs/behaviors)
- Calculate combinations: 2^n for n boolean conditions
- Fill in the expected action for each combination
- Look for rules that can be merged (if a condition does not affect the outcome)
Example: Shipping Rules
| Condition | Rule 1 | Rule 2 | Rule 3 | Rule 4 |
|---|---|---|---|---|
| Customer is premium? | Y | Y | N | N |
| Order > $100? | Y | N | Y | N |
| Action: Free shipping | Yes | Yes | Yes | No |
| Action: Gift wrapping | Yes | No | No | No |
This table reveals that Rule 3 (non-premium customer with large order) gets free shipping — is that intentional? Decision tables surface business logic questions that might otherwise go unnoticed.
More Complex Example: Loan Approval
| Condition | R1 | R2 | R3 | R4 | R5 | R6 | R7 | R8 |
|---|---|---|---|---|---|---|---|---|
| Credit score > 700? | Y | Y | Y | Y | N | N | N | N |
| Income > $50K? | Y | Y | N | N | Y | Y | N | N |
| Existing customer? | Y | N | Y | N | Y | N | Y | N |
| Approve loan | Yes | Yes | Yes | No | Yes | No | No | No |
| Interest rate | Low | Med | Med | - | Med | - | - | - |
From this table, derive one test case per rule. This ensures complete combinatorial coverage of the business logic.