Session 3.3 - Decision Table Techniques
Module 3: Dynamic & Static Testing | Duration: 1 hour
Learning Objectives
- Translate complex business rules into decision tables and validate coverage.
- Derive test cases from condition-action combinations systematically.
- Reduce ambiguity by representing rule conflicts and gaps explicitly.
Concept Overview
Decision table testing is a rule-based design technique used when output depends on multiple conditions. It converts policy logic into a structured table so every meaningful combination is visible and testable.
Discounts, eligibility, approvals, penalties, compliance rules, and workflow authorizations.
Prevents missing combinations that are easy to overlook in prose requirements.
Each column (rule) in the table maps directly to one or more test cases.
Why Decision Tables?
If there are n binary conditions, naive combinations are 2^n. Decision tables help you keep this manageable, identify invalid combinations, and document exact expected actions.
- Output depends on interaction of multiple conditions, not one field at a time.
- Rules include precedence (e.g., "if blocked, deny regardless of balance").
- Compliance/contract logic must be auditable and unambiguous.
How to Build a Decision Table
- Extract all atomic conditions from requirements.
- List all possible condition combinations (rules).
- Mark impossible combinations with "-" or remove with justification.
- Map expected actions for each valid rule.
- Generate at least one test case per remaining rule.
- Review for conflicts (same conditions, different actions) and gaps (no action defined).
Use
Y, N, and - (don't care) to keep tables readable.Name columns
R1, R2, ... and map tests as TC-R1, TC-R2.Peer review the table before test execution to catch requirement ambiguity early.
Worked Example: Loan Approval Rules
Policy: Loan is approved if applicant is salaried, credit score is at least 700, and no prior default. If prior default exists, always reject.
| Conditions / Actions | R1 | R2 | R3 | R4 | R5 | R6 |
|---|---|---|---|---|---|---|
| C1: Salaried? | Y | Y | Y | N | N | N |
| C2: Score >= 700? | Y | Y | N | Y | N | Y |
| C3: Prior default? | N | Y | N | N | N | Y |
| A1: Approve loan | Y | N | N | N | N | N |
| A2: Reject loan | N | Y | Y | Y | Y | Y |
TC-R1: Salaried=Y, Score=750, Default=N -> Approve.TC-R2: Salaried=Y, Score=750, Default=Y -> Reject (override by default).TC-R4: Salaried=N, Score=740, Default=N -> Reject.
Rule Simplification & Coverage
After initial table creation, simplify without losing behavioral coverage.
- Remove impossible rules (contradictory conditions).
- Merge rules with same action using don't-care conditions.
- Keep high-risk exception rules explicit (override or legal mandates).
- Every remaining rule has at least one test.
- Every action appears in at least one test.
- Priority/override conditions are tested directly.
- Error messages or fallback actions are verified.
Common Mistakes
Teams forget precedence logic and approve cases that should always reject.
Mixed conditions in one row cause ambiguous rules and poor traceability.
Leads to unnecessary tests and confusion during execution.
Checks status only, but ignores message, audit log, or side effect.
Class Activity
- Choose a feature with 3-4 rule conditions (discount, scholarship, insurance claim, leave approval).
- Write atomic condition rows and action rows.
- Create complete rule columns and mark impossible ones.
- Simplify table and derive one test per rule.
- Present 2 risky rules and explain why they need explicit tests.
- 3 marks: Correct condition/action extraction.
- 3 marks: Complete and consistent rule table.
- 2 marks: Effective simplification and pruning.
- 2 marks: Test mapping and expected outcomes.
Exit Ticket
- Why is one test per rule usually enough in a decision-table suite?
- What does
-(don't care) mean, and when is it safe to use? - Give one example of an override rule from any domain.
Summary & Assignment
Decision tables convert complex rule sets into clear, testable artifacts. They help teams validate completeness, avoid contradictory behavior, and design compact high-value suites.