Software Testing - Decision Table Testing
Decision Table Testing
Definition
Decision Table Testing is a software testing technique that uses a table format to represent different combinations of inputs (conditions) and their corresponding outputs (actions).
-
It is especially useful for systems with complex business rules and multiple conditions.
Purpose
-
Ensure that all possible combinations of inputs and their effects are tested.
-
Avoid missing any rule in complex decision-making scenarios.
Structure of a Decision Table
A decision table typically has four parts:
-
Conditions – The inputs or rules being considered.
-
Condition Alternatives – The possible states for each condition (e.g., Yes/No, True/False).
-
Actions – The possible outputs or operations that occur.
-
Action Entries – Which actions are taken for each combination of conditions.
Example
Scenario: Online shopping discount rule
-
If a customer is a member AND purchases more than $100, they get a 10% discount.
Condition | Rule 1 | Rule 2 | Rule 3 | Rule 4 |
---|---|---|---|---|
Customer is a member? | Yes | Yes | No | No |
Purchase > $100? | Yes | No | Yes | No |
Action: Give 10% discount | Yes | No | No | No |
Explanation:
-
Rule 1 → Both conditions true → Discount given.
-
Rule 2, 3, 4 → At least one condition false → No discount.
Advantages
-
Clear visualization of complex business rules.
-
Ensures full coverage of possible input combinations.
-
Reduces risk of missing conditions.
Limitations
-
Can become large and complex with too many conditions.
-
Not ideal for simple scenarios.