Decision Table

Cat the thinker

Decision table testing is based on the condition testing technique, but relies on the requirements rather than the code.

A decision table describes different system behaviours depending on combinations of condition states.

When should you use a decision table?

The requirements are clearly defined
The business logic includes scenarios with many conditions and behavioural variations
Different combinations of inputs affect system behaviour differently
You need to visualise complex logical conditions and their outcomes

Example form and requirements for testing

Room Booking
Meeting

Requirements

The «Room Booking» form allows you to reserve a meeting room for a specific period of time.

The form has four input parameters: Meeting duration, Room, Confirmation required, Email address.

  • The Andromeda room cannot be booked for less than 1 hour, with or without confirmation.
  • The Little Bear and Orion rooms can be booked for any duration, with or without confirmation.

When the Confirmation required checkbox is selected, the Email address field becomes mandatory.

Event Message
Successful booking The {room_name} room has been successfully booked for {duration}.
Attempt to book the «Andromeda» room for less than 1 hour The Andromeda room cannot be booked for less than 1 hour.
Attempt to book with the Confirmation required checkbox selected but without email Enter your email for confirmation.

How to create a decision table?

From the requirements it follows that processing the form may lead to three different results shown to the user, depending on the combination of input parameters.

  1. First, list the conditions, that affect system behaviour.
  2. Then add the results — the messages returned to the user when the form is processed.
  3. Next, mark all possible condition states and the resulting system behaviour for each combination (1–16).
Condition 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Room is Andromeda?
Duration ≥ 1 hour?
Confirmation required?
Email provided?
Result
The {room_name} room has been successfully booked for {duration}.
The Andromeda room cannot be booked for less than 1 hour.
Enter your email for confirmation.
Task
Task available to premium users!
Sidebar arrow