Skip to main content

Module 3 · Test design

Decision tables

Turn business rules with several conditions into a complete set of test cases.

About 9 min reading and 15 min practice (estimates)

Loading progress…

Read

Learning objectives

  • List the conditions and actions of a rule.
  • Build a decision table that covers every combination.
  • Spot impossible or missing combinations and ask about them.

Explanation

When a result depends on several conditions together, testing them one at a time misses interactions. A decision table lists the conditions as rows, every combination of their values as columns (rules), and the expected action for each rule. With n yes/no conditions there are 2ⁿ combinations; some may be impossible and can be removed — after confirming with the team.

Example: gift-wrapping fee (fictional rule)

Rule: gift wrapping costs 0.500 OMR. It is free for members, and free for anyone whose order is 25.000 OMR or more. Wrapping is not available for notebooks.

Condition / actionR1R2R3R4R5
Item is a notebookYNNNN
Member–YYNN
Order ≥ 25.000–YNYN
Wrapping offeredNoYesYesYesYes
Fee–0.0000.0000.0000.500

"–" means the condition doesn't matter for that rule, which collapses four notebook combinations into R1.

Common mistakes

  • Listing only the combinations mentioned in the requirement text.
  • Removing "impossible" combinations without checking they really are impossible.
  • Forgetting that each rule still needs a boundary check (here, 24.999 versus 25.000).

Try

Practise what you just read. Answers are checked here; nothing is graded publicly or counts toward Bug Arena.

Exercise

A delivery rule: express delivery is available in Muscat and Seeb only, costs 3.000 OMR, and is free for members. Standard delivery is available everywhere. Build a decision table with conditions "City is Muscat or Seeb", "Member" and "Express chosen".

Write your answer first, then compare it with the sample solution. It stays on this page only and isn't sent anywhere.

Review

Check yourself — you should now be able to:

  • List the conditions and actions of a rule.
  • Build a decision table that covers every combination.
  • Spot impossible or missing combinations and ask about them.

Continue

When you’re ready, mark the lesson complete in the Try step and move on.

Marked as read when you reach the end of the lesson.