Test levels and methods
Decision table testing
Decision table testing records combinations of conditions and the expected actions for each in a table. Every column of the table becomes a test case.
Also known as: decision table, cause-effect table
When decision tables help
As soon as several conditions together decide the outcome, plain text quickly becomes hard to follow. A table shows every combination at a glance and exposes gaps in the specification.
An example
A motor may only start if the guard door is closed and no emergency stop is active.
| R1 | R2 | R3 | R4 | |
|---|---|---|---|---|
| Door closed | yes | yes | no | no |
| Emergency stop active | no | yes | no | yes |
| Motor starts | yes | no | no | no |
Four rules, four test cases. Each additional condition doubles the number of combinations. Columns with the same outcome can then often be merged, here R2 to R4.
The real benefit
Often the biggest value comes from drawing up the table itself: questions like “What should happen if both occur at once?” surface before the code is written.