Decision table is a brief visual representation for specifying which actions to perform depending on given conditions. The information represented in decision tables can also be represented as decision trees or in a programming language using if-then-else and switch-case statements.
A decision table is a good way to settle with different combination inputs with their corresponding outputs and also called cause-effect table. Reason to call cause-effect table is a related logical diagramming technique called cause-effect graphing that is basically used to obtain the decision table.
Importance of Decision Table:
- Decision tables are very much helpful in test design technique.
- It helps testers to search the effects of combinations of different inputs and other software states that must correctly implement business rules.
- It provides a regular way of stating complex business rules, that is helpful for developers as well as for testers.
- It assists in development process with developer to do a better job. Testing with all combination might be impractical.
- A decision table is basically an outstanding technique used in both testing and requirements management.
- It is a structured exercise to prepare requirements when dealing with complex business rules.
- It is also used in model complicated logic.
Decision Table in test designing:
CONDITIONS STEP 1 STEP 2 STEP 3 STEP 4 Condition 1 Condition 2 Condition 3 Condition 4
CONDITIONS STEP 1 STEP 2 STEP 3 STEP 4 Condition 1 Y Y N N Condition 2 Y N Y N Condition 3 Y N N Y Condition 4 N Y Y N
Advantage of Decision Table:
- Any complex business flow can be easily converted into the test scenarios & test cases using this technique.
- Decision tables work iteratively that means the table created at the first iteration is used as input table for next tables. The iteration is done only if the initial table is not satisfactory.
- Simple to understand and everyone can use this method design the test scenarios & test cases.
- It provide complete coverage of test cases which help to reduce the rework on writing test scenarios & test cases.
- These tables guarantee that we consider every possible combination of condition values. This is known as its completeness property.