Decision Table Testing (Example)
โก Smart Summary
Decision Table Testing is a black-box technique that captures input combinations and their expected outputs in a tabular form. This tutorial explains the cause-effect concept, walks through login and upload examples, and shows why the method delivers strong coverage for complex business logic.

What is Decision Table Testing?
Decision table testing is a software testing technique used to test system behavior for different input combinations. It is a systematic approach in which the different input combinations and their corresponding system behavior (output) are captured in a tabular form. That is why it is also called a Cause-Effect table, where causes and effects are recorded for better test coverage.
A Decision Table is a tabular representation of inputs versus rules, cases, or test conditions. It is a highly effective tool for both complex software testing and requirements management. A decision table helps check all possible combinations of conditions, and testers can easily identify missing conditions. Conditions are indicated using True (T) and False (F) values.
Example 1: Decision Table for a Login Screen
Let us create a decision table for a login screen.
The condition is simple: if the user provides the correct username and password, they are redirected to the homepage. If any input is wrong, an error message is displayed.
| Conditions | Rule 1 | Rule 2 | Rule 3 | Rule 4 |
|---|---|---|---|---|
| Username (T/F) | F | T | F | T |
| Password (T/F) | F | F | T | T |
| Output (E/H) | E | E | E | H |
Legend:
- T โ Correct username/password
- F โ Wrong username/password
- E โ Error message is displayed
- H โ Home screen is displayed
Interpretation:
- Case 1 โ Username and password both wrong. The user is shown an error message.
- Case 2 โ Username correct, password wrong. The user is shown an error message.
- Case 3 โ Username wrong, password correct. The user is shown an error message.
- Case 4 โ Username and password both correct. The user navigates to the homepage.
When converting this to a test case, you can create two scenarios, because the three error cases all test the same rule.
- Enter the correct username and correct password, then click Login โ the user should navigate to the homepage.
- Enter a wrong username and/or wrong password, then click Login โ the user should see an error message.
Example 2: Decision Table for an Upload Screen
Now consider a dialog box that asks the user to upload a photo under certain conditions:
- Only the “.jpg” format is allowed.
- File size must be less than 32 KB.
- Resolution must be 137 ร 177.
If any condition fails, the system throws a corresponding error message; if all conditions are met, the photo uploads successfully.
The decision table for this case is shown below.
| Conditions | Case 1 | Case 2 | Case 3 | Case 4 | Case 5 | Case 6 | Case 7 | Case 8 |
|---|---|---|---|---|---|---|---|---|
| Format | .jpg | .jpg | .jpg | .jpg | Not .jpg | Not .jpg | Not .jpg | Not .jpg |
| Size | < 32 KB | < 32 KB | ≥ 32 KB | ≥ 32 KB | < 32 KB | < 32 KB | ≥ 32 KB | ≥ 32 KB |
| Resolution | 137ร177 | Not 137ร177 | 137ร177 | Not 137ร177 | 137ร177 | Not 137ร177 | 137ร177 | Not 137ร177 |
| Output | Photo uploaded | Resolution mismatch | Size mismatch | Size & resolution mismatch | Format mismatch | Format & resolution mismatch | Format & size mismatch | Format, size & resolution mismatch |
From this table, you can create eight test cases for complete coverage:
- .jpg, < 32 KB, 137ร177 โ photo uploads successfully.
- .jpg, < 32 KB, not 137ร177 โ resolution-mismatch error.
- .jpg, ≥ 32 KB, 137ร177 โ size-mismatch error.
- .jpg, ≥ 32 KB, not 137ร177 โ size and resolution mismatch error.
- Not .jpg, < 32 KB, 137ร177 โ format-mismatch error.
- Not .jpg, < 32 KB, not 137ร177 โ format and resolution mismatch error.
- Not .jpg, ≥ 32 KB, 137ร177 โ format and size mismatch error.
- Not .jpg, ≥ 32 KB, not 137ร177 โ format, size, and resolution mismatch error.
Why Decision Table Testing is Important
Decision table testing is important because it tests many combinations of conditions and provides strong coverage for complex business logic. When system behavior differs for each set of inputs, the technique gives good coverage in a simple, easy-to-read representation.
In software engineering, boundary value analysis and equivalence partitioning are similar techniques, but they are most effective when the system shows the same behavior across a large set of inputs. When the behavior is different for each input combination, those techniques cannot ensure good coverage โ and decision table testing becomes the better option.
This table also serves as a reference for requirements and functionality development because it is easy to understand and covers all combinations. The significance grows as inputs increase: the number of possible combinations is 2^n, where n is the number of inputs. For n = 10, which is common in web forms, that is 1,024 combinations. You cannot test all of them, but you can select a rich subset using decision-based testing.
Advantages of Decision Table Testing
- Works when system behavior differs across inputs, where equivalence partitioning and boundary value analysis fall short.
- The representation is simple, so it is easily interpreted and useful for both development and business teams.
- Helps build effective combinations and ensures better test coverage.
- Any complex business condition can be turned into a decision table.
- Can ensure 100% coverage when the number of input combinations is low.
Disadvantages of Decision Table Testing
The main disadvantage is that as the number of inputs increases, the table becomes more complex and harder to manage.


