Decision tables are a precise yet compact way to model complicated logic. Decision tables, like if-then-else and switch-case statements, associate conditions with actions to perform.
But, unlike the control structures found in traditional programming languages, decision tables can associate many independent conditions with several actions in an elegant way.
Why is it needed
- Specifying complex program logic
- Generating test cases (Also known as logic-based testing)
Logic Based Testing
- Structural testing when applied to structure (i.e. control flow graph of an implementation).
- Functional testing when applied to a specification.
Conditions – (Condition stub)
Condition Alternatives – (Condition Entry)
Actions – (Action Stub)
Table 1: Decision Table Structure
Each condition corresponds to a variable, relation or predicate
Possible values for conditions are listed among the condition alternatives:
- Boolean values (True/False) – Limited Entry Decision Tables
- Several values – Extended Entry Decision Tables
- Don’t care value
Each action is a procedure or operation to perform
The entries specify whether (or in what order) the action is to be performed