Decision Tables and State Transitions
Decision tables
Use a decision table when the result depends on a combination of conditions. List every combination and the expected outcome.
Rule: free shipping if the order is over $50 or the customer is a member.
| Order > $50 | Member | Free shipping? |
|---|---|---|
| Yes | Yes | Yes |
| Yes | No | Yes |
| No | Yes | Yes |
| No | No | No |
Each row becomes one test case. With 3 conditions you get 8 rows, which is still easy to cover.
State transition testing
Use it when the system moves between states, such as an order: Created → Paid → Shipped → Delivered, with Cancelled possible before shipping.
- Test every valid transition (Paid → Shipped).
- Test invalid transitions too (Delivered → Paid should be impossible).
- A classic example: after 3 wrong passwords the account goes to a Locked state.
Practice: the practice login page locks for 30 seconds after 3 failed tries. Draw its states and test each transition.
All 12 lessons in Manual Testing
- What Is Software Testing?
- QA vs QC vs Testing
- The Software Testing Life Cycle (STLC)
- Levels of Testing
- Functional vs Non-functional Testing
- Smoke, Sanity and Regression Testing
- Writing Good Test Cases
- Equivalence Partitioning and Boundary Value Analysis
- Decision Tables and State Transitions
- The Bug Life Cycle
- Writing a Great Bug Report
- Severity vs Priority, and Your Final Practice