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:

    1. Write the conditions in seperate rows.
Condition A 
Condition B
Condition C
    1. Now make 2^n columns where n is the number of conditions.
Condition A |   |   |   |   |   |   |   |   |
Condition B |   |   |   |   |   |   |   |   |
Condition C |   |   |   |   |   |   |   |   |
    1. Start at the bottom condition and write alternating Y and N.
Condition A |   |   |   |   |   |   |   |   |
Condition B |   |   |   |   |   |   |   |   |
Condition C | Y | N | Y | N | Y | N | Y | N |
    1. Fill the next row with alternating Y Y N N …
Condition A |   |   |   |   |   |   |   |   |
Condition B | Y | Y | N | N | Y | Y | N | N |
Condition C | Y | N | Y | N | Y | N | Y | N |
    1. Each row you double the number of consecutive Ys and Ns.
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 |
    1. Do so until all rows are filled.
    2. Now you can add your decisions to the table.
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!

Be Sociable, Share!
  1. Rayk says:

    Ha, it works! This internet is awesome!

  2. Joerg says:

    Yeah pingbacks are great, aren’t they!

  1. […] 2009 April 5 by Rayk Fenske Triggerd by Jörgs posting about the simple creation of decission tables for later test cases I remebered a part of my thesis back in 1997: Karnaugh Veitch Tables. So, I re-LaTexed the specific […]

Leave a Reply