Decision Table Testing is a software testing methodology used to test system behaviour for various input combinations. In this systematic approach, the several input combinations and their corresponding system behaviour are represented in tabular form. The decision table is also called a Cause-Effect table, as the causes and effects for comprehensive test coverage are captured in this table. Decision Table testing is a commonly used black-box testing technique and is ideal for testing two or more inputs that have a logical relationship.
What is a Decision Table?
A decision table is the tabular representation of several input values, cases, rules, and test conditions. The Decision table is a highly effective tool utilized for both requirements management and complex software testing. Through this table, we can check and verify all possible combinations of testing conditions. The testers can quickly identify any skipped needs by reviewing the True(T) and False(F) values assigned for these conditions.
Advantages Of Decision Table Testing
- Decision tables are one of the most effective and full-proof design testing techniques.
- Testers can use decision table testing to test the results of several input combinations and software states.
- It gives the developers to state and analyzes complex business rules.
- Decision table testing is the most preferred black box testing and requirements management.
- A decision table is used for modelling complex business logic. They can first be converted to test cases and test scenarios through decision table testing.
- This technique provides comprehensive coverage of all test cases that can significantly reduce the re-work on writing test cases and test scenarios.
- Decision tables guarantee coverage of all possible combinations of condition values which are called completeness property.
- Decision tables can be used iteratively. The table results created in the first testing iteration can be used for the next and so on.
- Decision tables are easy to understand, and everyone can use and implement this design and testing method, scenarios and test cases without prior experience.
- Multiple conditions, scenarios and results can be viewed and analyzed on the same page by both developers and testers.
Decision Table Examples
A decision table is a tabular representation of inputs vs cases, rules and test conditions.
Example 1: In this example, we see how to create the decision table for a login screen that asks for UserId and Password.
The condition here is that the user will be redirected to the homepage if he enters the correct user name and password, and an error message will be displayed if the input is wrong.
|Conditions||Rule 1||Rule 2||Rule 3||Rule 4|
T- Correct username or password
F- Wrong username or password
E- Error message is displayed.
H – Home screen is displayed.
Decision Table Interpretation:
Case 1: Username and Password both are wrong, and the user is shown an error message.
Case 2: Username is correct, but the password is wrong, and the user is shown an error message,
Case 3: The username is wrong, but the password is correct, and the user is shown an error message.
Case 4: Username and password both are correct, and the user is taken to the homepage.
Test Scenarios Possible For This Decision Table:
- Enter correct username, correct password, and click on login. The expected result is that the user should navigate to the homepage.
- Enter correct username, wrong password, and click on login. The expected result is that the user should get an error message.
- Enter the wrong username, correct password, and click on login. The expected result is that the user should get an error message.
- Enter the wrong username, wrong password, and click on login. The expected result is that the user should get an error message.
Example 2: In this example, we consider the decision table and test scenarios for an Upload screen.
There is a dialogue box that will ask the user to upload a photo with the following conditions:
- The file must be in the .jpg format.
- The file size must be less than 32kb.
- The image resolution must be 137*177.
If any one of the above conditions fails, the system will display the corresponding error messages about the issue. If all conditions are satisfied, the photo will be uploaded successfully.
|Conditions||Case 1||Case 2||Case 3||Case 4||Case 5||Case 6||Case 7||Case 8|
|Size||< 32 kb||< 32 kb||>= 32 kb||>=32 kb||< 32 kb||< 32 kb||>= 32 kb||>= 32 kb|
|Output||Photo uploaded successfully||Error message due to resolution mismatch||Error message due to size mismatch||Error message due to size and resolution mismatch||Error message due to format mismatch||Error message due to format and resolution mismatch||Error message due to format and size mismatch||Error message due to format, size and resolution mismatch|
For these conditions of the decision table, we can formulate eight different test cases or input scenarios to cover all the possibilities.
Learn Software Courses online from the World’s top Universities. Earn Executive PG Programs, Advanced Certificate Programs, or Masters Programs to fast-track your career.
Scope of Decision Table Testing
When data is complex, and every combination needs to be tested, decision tables can become huge. You can intelligently reduce the number of varieties in each possibility to only choose the interesting and impactful ones. This approach is called Collapsed Decision Table Testing.
In this technique, redundant conditions that are irrelevant to the outcome are removed, and different outputs are produced. An additional layer of analysis is added to the test design so that the tester can perform more effective testing.
Decision tables are a robust specification-based testing technique that can work for many scenarios. The tabular and the graphical representation is very beneficial for all stakeholders and non-technical members to understand easily.
The project team members can instantly obtain detailed insights about the problem at hand through illustrative examples and real-life scenarios.
By moving to the next level of collapsed decision-making table, the management can realize the effectiveness and efficiency of this testing technique.
If you’re interested to learn more about full-stack development, check out upGrad & IIIT-B’s Executive PG Program in Full-stack Software Development, which is designed for working professionals and offers 500+ hours of rigorous training, 9+ projects and assignments, IIIT-B Alumni status, practical hands-on capstone projects & job assistance with top firms.
What are decision tables?
How to test decision tables?
Decision tables are essential for making decisions, and testing them is an essential part of the development process. There are two types of tests you can perform on decision tables: Implied probabilities, and Monte Carlo methods. Implied probabilities: Formalize the problem into a decision table, and use the calculated probabilities of the table to calculate implied probabilities. This is the best method for small decision tables. Monte Carlo methods: Use a simulation program to evaluate the effectiveness of the decision tables, and continue the simulation until the statistical variance is low enough. This is the best method for large decision tables.
What are the applications of decision tables?