A decision table is a good way to deal with different combination inputs with their associated outputs. It is a black box test design technique to determine the test scenarios for complex business logic. In this article, know more about how the decision table in software testing helps in test design technique in the following sequence:
- What is Decision Table in Software Testing?
- Why is Decision Table important?
- Advantages of Decision Table in Software Testing
- Way to Use Decision Table: Example
What is Decision Table in Software Testing?
The decision table is a software testing technique which is used for testing the system behavior for different input combinations. This is a systematic approach where the different input combinations and their corresponding system behavior are captured in a tabular form.
This table helps you deal with different combination inputs with their associated outputs. Also, it is known as the cause-effect table because of an associated logical diagramming technique called cause-effect graphing that is basically used to derive the decision table.
Why is Decision Table Important?
A decision table is an outstanding technique used for testing and requirements management. Some of the reasons why the decision table is important include:
Decision tables are very much helpful in test design technique.
It helps testers to search the effects of combinations of different inputs and other software states that implement business rules.
It provides a regular way of stating complex business rules which benefits the developers as well as the testers.
It assists in the development process with the developer to do a better job. Testing with all combination might be impractical.
It the most preferable choice for testing and requirements management.
It is a structured exercise to prepare requirements when dealing with complex business rules.
It is also used in model complicated logic.
Advantages of Decision Table in Software Testing
There are different advantages of using the decision table in software testing such as:
Any complex business flow can be easily converted into the test scenarios & test cases using this technique.
Decision tables work iteratively. Therefore, the table created at the first iteration is used as the input table for the next tables. The iteration is done only if the initial table is not satisfactory.
Simple to understand and everyone can use this method to design the test scenarios & test cases.
It provides complete coverage of test cases which help to reduce the rework on writing test scenarios & test cases.
These tables guarantee that we consider every possible combination of condition values. This is known as its completeness property.
Way to use Decision Table: Example
A Decision Table is a tabular representation of inputs versus rules, cases or test conditions. Let’s take an example and see how to create a decision table for a login screen:
The condition states that if the user provides the correct username and password the user will be redirected to the homepage. If any of the input is wrong, an error message will be displayed.
Conditions | Rule 1 | Rule 2 | Rule 3 | Rule 4 |
Username | F | T | F | T |
Password | F | F | T | T |
Output | E | E | E | H |
In the above example,
- T – Correct username/password
- F – Wrong username/password
- E – Error message is displayed
- H – Home screen is displayed
Now let’s understand the interpretation of the above cases:
Case 1 – Username and password both were wrong. The user is shown an error message.
Case 2 – Username was correct, but the password was wrong. The user is shown an error message.
Case 3 – Username was wrong, but the password was correct. The user is shown an error message.
Case 4 – Username and password both were correct, and the user is navigated to the homepage.
So, this was an example of building a decision table in software testing. with this we have come to the end of this article.
Now that you have understood Decision Table in Software Testing, check out the Software Testing Fundamentals Course by Edureka. This course is designed to introduce you to the complete software testing life-cycle. You will be learning different levels of testing, test environment setup, test case design technique, test data creation, test execution, bug reporting, CI/CD pipeline in DevOps, and other essential concepts of software testing.
Got a question for us? Please mention it in the comments section of this “Decision Table in Software Testing” blog and we will get back to you as soon as possible.