Skip to content
Course outline

Decision table tool

Every combination of the conditions, an action for each, then the rules merged down to the test cases you need.

  • Free, no sign-up
  • Runs in your browser
  • Nothing you type is sent anywhere

Business rules hide many cases in a few sentences. "WELCOME5 takes 5.00 off a basket of 25.00 or more, once per account" mixes three conditions, so eight combinations, and a requirement rarely says what happens in each of them. A decision table makes every combination visible, so none is forgotten and none is tested twice.

List the conditions; the tool writes every rule (one per combination). Give each rule its action, and it merges the rules whose action does not depend on a condition, leaving one test case per rule that is left.

Use the tool

One per line: its name for yes or no, or "Name: value, value" for other values. Up to 64 rules.

8 rules. Write the action of each one.

Every rule and its action
RuleCode is validBasket is 25.00 or moreCode used before by this shopperAction
1YYY
2YYN
3YNY
4YNN
5NYY
6NYN
7NNY
8NNN

Merged: 4 rules, so 4 test cases.

The merged rules: one test case each
RuleCode is validBasket is 25.00 or moreCode used before by this shopperAction
R1YYYRefuse: already used
R2YYNTake 5.00 off
R3YN-Refuse: the basket is under 25.00
R4N--Refuse: the code is not valid

How the method works

Each condition is yes or no, or one of a few values. The full table has one rule for each combination: two conditions make four rules, three make eight. Writing an action for every rule is where the gaps in a requirement show: when nobody can say what should happen, ask before you test.

Two rules with the same action that differ in one condition only, and between them take all its values, become one rule with "-" for that condition: it does not matter there. The tool repeats this until nothing more merges. Each merged rule is one test case.

  1. One condition per line: its name for yes or no, or "Name: value, value" for more values.
  2. Write the action of every rule in the full table.
  3. Test each merged rule once: choose values that match it, and check its action.

A worked example on Cedar Books

The welcome code WELCOME5 at Cedar Books takes 5.00 off a basket of 25.00 or more, once per account (the coupon list on the practice shop page). Three conditions make eight rules; merged, four cases remain:

The merged rules of WELCOME5
RuleCode is validBasket is 25.00 or moreCode used before by this shopperAction
R1YYYRefuse: already used
R2YYNTake 5.00 off
R3YN-Refuse: the basket is under 25.00
R4N--Refuse: the code is not valid

Rule R3 holds whatever the shopper did before: an under-25.00 basket is refused either way. Rule R4 holds whenever the code is not valid. Four tests instead of eight, and no case missed.

Learn more

Put the lessons to work on a real site

Describe a user journey in plain English. QAIA walks it in a real browser and hands back the test cases, the automation code and the evidence of every step.