Software Testing - Decision Table Testing

Decision Table Testing is a Black-Box testing technique used to test systems that involve multiple input conditions and different outcomes.
It helps testers identify all possible combinations of inputs and ensures the system behaves correctly for each combination.

It is also known as Cause–Effect Table Testing.


What Is Decision Table Testing?

Decision Table Testing organizes complex business rules into a table format with:

  • Conditions (inputs)

  • Actions (outputs)

  • Rules (combinations of conditions)

Each row in the table helps testers verify how different combinations of inputs lead to different results.

This technique is especially useful for testing business logic, calculations, and decision-based workflows.


Why Use Decision Table Testing?

  1. Handles complex decision-making rules

  2. Ensures coverage of all input combinations

  3. Eliminates missing scenarios

  4. Makes business rules easier to understand

  5. Reduces ambiguity in requirements


Structure of a Decision Table

A decision table is divided into four logical parts:

  1. Condition Stub – Lists the conditions

  2. Condition Entries – Values of conditions (Yes/No, True/False, or ranges)

  3. Action Stub – Lists the possible actions/outcomes

  4. Action Entries – What action should occur for each rule

Each column in the table represents one unique combination of inputs (one rule).


Decision Table Testing Examples


Example 1: Login Validation

Requirement:

A user can log in only if:

  1. Username is correct

  2. Password is correct

Decision Table

Condition Rule 1 Rule 2 Rule 3 Rule 4
Username correct? Y Y N N
Password correct? Y N Y N
Action: Allow login Y N N N

Interpretation

  • Only Rule 1 allows login

  • Any incorrect input results in login failure


Example 2: Discount Calculation

Requirement:

A store gives discounts based on membership and purchase amount:

  • If Member and Purchase ≥ ₹1000 → 20% discount

  • If Member and Purchase < ₹1000 → 10% discount

  • If Not a Member → No discount

Decision Table

Condition Rule 1 Rule 2 Rule 3
Is customer a member? Y Y N
Purchase ≥ ₹1000? Y N -
Action: 20% discount Y N N
Action: 10% discount N Y N
Action: No discount N N Y

Interpretation

  • Members with high purchases → 20%

  • Members with low purchases → 10%

  • Non-members → No discount


Example 3: ATM Withdrawal

Requirement:

Cash withdrawal allowed only if:

  1. Card is valid

  2. PIN is correct

  3. Balance is sufficient

Decision Table (simplified)

Condition R1 R2 R3 R4 R5 R6 R7 R8
Valid card? Y Y Y Y N N N N
Correct PIN? Y Y N N Y Y N N
Sufficient balance? Y N Y N Y N Y N
Action: Withdraw Y N N N N N N N

Interpretation

  • Only Rule 1 allows withdrawal.

  • Any failure leads to rejection.


When to Use Decision Table Testing

  • When multiple conditions influence the outcome

  • When business rules are complex

  • For systems involving calculations

  • For e-commerce, finance, insurance, and approval workflows

  • When you need complete combination coverage


Advantages of Decision Table Testing

  • Perfect for modelling complex logic

  • Ensures complete testing of combinations

  • Easy to convert into test cases

  • Reduces ambiguity in requirements

  • Helps catch missing or incorrect rules


Limitations

  • Can become large when conditions increase

  • Not ideal for simple or straightforward workflows

  • Needs clear business rules to design the table