Super simple method to create a boolean decision table
Today one of our test engineers, Manfred, presented about systematic identification of test values. One of the topics were decision tables. I was fascinated how easy he created tables with all possible combinations. Here is how:
- Write the conditions in seperate rows.
- Now make 2^n columns where n is the number of conditions.
- Start at the bottom condition and write alternating Y and N.
- Fill the next row with alternating Y Y N N …
- Each row you double the number of consecutive Ys and Ns.
- Do so until all rows are filled.
- Now you can add your decisions to the table.
Condition A Condition B Condition C
Condition A | | | | | | | | | Condition B | | | | | | | | | Condition C | | | | | | | | |
Condition A | | | | | | | | | Condition B | | | | | | | | | Condition C | Y | N | Y | N | Y | N | Y | N |
Condition A | | | | | | | | | Condition B | Y | Y | N | N | Y | Y | N | N | Condition C | Y | N | Y | N | Y | N | Y | N |
Condition A | Y | Y | Y | Y | N | N | N | N | Condition B | Y | Y | N | N | Y | Y | N | N | Condition C | Y | N | Y | N | Y | N | Y | N |
Condition A | Y | Y | Y | Y | N | N | N | N | Condition B | Y | Y | N | N | Y | Y | N | N | Condition C | Y | N | Y | N | Y | N | Y | N | --------------------------------------------- Decision 1 | | X | X | | | | | | ...
Using this algorithm you can be sure you covered all combinations. It doesn’t matter how many conditions you have and you don’t even have to think
Thanks Manfred!



Ha, it works! This internet is awesome!
Yeah pingbacks are great, aren’t they!