Equivalence partitioning and boundary value analysis are most suitable when we have specific inputs that are treated independently.
When the outcome of software execution depends on multiple inputs that are interrelated, the above-mentioned two techniques are not effective.
Decision table testing is a suitable method of analysing combinations of interrelated input values. This technique is also known as “cause-effect” table.
A decision table is designed as follows:
An insurance software calculates premium based on the following rules:
The following table shows possible valid and invalid combinations of the three input parameters and the appropriate output values (premium) for each combination.
Condition/Rule | Rule 1 | Rule 2 | Rule 3 | Rule 4 | Rule 5 | Rule 6 | Rule 7 | Rule 8 |
---|---|---|---|---|---|---|---|---|
Male | T | T | T | T | F | F | F | F |
Female | T | T | F | F | T | T | F | F |
Car has alarm | T | F | T | F | F | T | T | F |
Result | X | X | $1350 | $1500 | $1000 | $900 | X | X |
An e-commerce application calculates shipping fee as follows:
The following table shows possible valid and invalid combinations of the three input parameters and the appropriate shipping fee for each combination.
Condition/Rule | Rule 1 | Rule 2 | Rule 3 | Rule 4 | Rule 5 | Rule 6 | Rule 7 | Rule 8 |
---|---|---|---|---|---|---|---|---|
Ground | T | T | T | T | F | F | F | F |
Air | T | T | F | F | T | T | F | F |
Value > $30 | T | F | T | F | F | T | T | F |
Result | X | X | $7 | $10 | $20 | $14 | X | X |