- Trending Categories
- Data Structure
- Operating System
- MS Excel
- C Programming
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Learn Decision Table Testing with Example
A Decision Table is a table that shows the relationship between inputs and rules, cases, and test conditions. It's a very useful tool for both complicated software testing and requirements management. The decision table allows testers to examine all conceivable combinations of requirements for testing and to immediately discover any circumstances that were overlooked. True(T) and False(F) values are used to signify the criteria.
What is Decision Table Testing?
Decision table testing is a type of software testing that examines how a system responds to various input combinations. This is a methodical methodology in which the various input combinations and the accompanying system behavior (Output) are tabulated. That's why it's also known as a Cause-Effect table because it captures both causes and effects for improved test coverage.
Let's start with a simple example.
Example 1 − How to Create a Login Screen Decision Base Table
Let's make a login screen with a decision table. A login screen with E-mail and Password Input boxes.
The condition is simple − The user will be routed to the homepage if they give the right username and password. An error warning will appear if any of the inputs are incorrect.
|Conditions||Rule 1||Rule 2||Rule 3||Rule 4|
T - Make sure your login and password are correct.
F - Incorrect login or password
E - An error message appears.
H - The home screen appears.
Case 1 − Both the username and password were incorrect. An error message is displayed to the user.
Case 2 − The username and password were both right, however, the password was incorrect. An error message is displayed to the user.
Case 3 − Although the username was incorrect, the password was accurate. An error message is displayed to the user.
Case 4 − The user's username and password were both accurate, and the user went to the homepage.
We may generate two situations when converting this to a test case.
Enter the right username and password and click Login; the intended consequence is that the user will be sent to the homepage.
And one from the situation below.
If the user types in the erroneous username and password and then clicks Login, the user should receive an error message.
When you provide the proper username and incorrect password and click Login, the user should see an error message.
If the user types the erroneous username and password and then clicks Login, the user should receive an error message.
Because they are both effectively testing the same rule.
Example 2 − How to Make an Upload Screen Decision Table
Consider a dialog box that prompts the user to submit a photo under particular situations, such as -
You can only upload images in the '.jpg' format.
a file with a size of fewer than 32 kilobytes
137*177 pixels is the resolution.
If any of the requirements are not satisfied, the system will display an error notice describing the problem, and if all conditions are met, the photo will be correctly updated.
Let's make a choice table for this situation.
|Condition s||Case 1||Case 2||Case 3||Case 4||Case 5||Case 6||Case 7||Case 8|
|Size||Less than 32 kb||Less than 32 kb||>=3 2 kb||>=32 kb||Less than 32 kb||Less than 32 kb||>=32 kb||>=32 kb|
|Resolution||137* 177||Not 137* 177||137* 177||Not 137*1 77||137*1 77||Not 137*17 7||137*17 7||Not 137*177|
|Output||Photo Uploaded||Error Message resolution mismatched||Error message size mismatch||Error message size and resolution mismatched||Error message for format mismatch||Error message format and resolution mismatch||Error message for format and size mismatch||Error message for format, size, resolutio n mismatch|
Based on the given data, we can develop 8 separate test cases to assure comprehensive coverage for this condition.
Click on upload to add a photo with the type '.jpg,' a file size of less than 32kb, and a resolution of 137*177 pixels. The expected outcome is that the photo will upload successfully.
Click on upload to add a photo with the format '.jpg,' a file size of less than 32kb, and a resolution of less than 137*177 pixels. The anticipated outcome is The resolution mismatch in error messages should be displayed.
Click on upload to add a photo with the format '.jpg,' a file size of more than 32kb, and a resolution of 137*177 pixels. The anticipated outcome is The size of the error message should be displayed.
Click on upload to add a photo with the type '.jpg,' a file size greater than 32kb, and a resolution of less than 137*177 pixels. The anticipated outcome is A discrepancy in the size and resolution of error messages should be displayed.
Click on upload and select a photo with a format other than '.jpg,' a file size of less than 32kb, and a resolution of 137*177 pixels. The anticipated outcome is If there is a format mismatch, an error message should be displayed.
Click on upload and select a photo with a format other than '.jpg,' a file size of less than 32kb, and a resolution of less than 137*177 pixels. Error message format and resolution mismatch should be shown as the expected outcome.
Click on upload to add a photo in a format other than '.jpg,' a file size greater than 32kb, and a resolution of 137*177 pixels. Error notice for format and size mismatch should be displayed, as expected.
Click on upload and select a photo with a format other than '.jpg,' a file size of more than 32kb, and a resolution of less than 137*177 pixels. The anticipated outcome is If there is a format, size, or resolution mismatch, an error message should be displayed.
Importance of Decision Table Testing
Decision table testing is important because it allows you to test multiple combinations of circumstances and ensures that complicated business logic is thoroughly tested. Decision table testing provides high coverage and the representation is simple, making it easy to read and apply for evaluating the behavior of a vast number of inputs where system behavior vary with each set of input.
Boundary value and analogous partition are two more related strategies used in Software Engineering to provide greater coverage. They're utilized when a system's behavior is consistent over a wide number of inputs. However, in a system with varied system behavior for each set of input values, the boundary value and equivalent partitioning techniques are ineffective in guaranteeing appropriate test coverage.
Decision table testing is a useful alternative in this instance. This approach ensures adequate coverage, and the representation is straightforward, making it simple to understand and apply.
Because it is simple to grasp and covers all possible combinations, this table may be used as a reference for requirements and functionality development.
As the number of inputs grows, the relevance of this strategy becomes apparent. 2 n, where n is the number of inputs, equals the number of potential combinations. The number of combinations for n = 10, which is very common in web-based testing with large input forms, is 1024. Obviously, you cannot test all conceivable combinations, but you may pick a large subset of them using the decision-based testing approach.
Decision Table Testing's Benefits
When the system behavior varies depending on the input and is not consistent over a range of inputs, neither equivalent partitioning nor boundary value analysis can help, but a decision table can.
The representation is basic enough to be simply understood and may be utilized for both development and business.
This table will aid in the creation of successful combinations and can improve testing coverage.
Any complicated business situation may readily be transformed into a decision table.
This strategy can provide coverage when we are aiming for 100 percent coverage, which is usually the case when the number of input choices is modest.
Decision Table Testing's Drawbacks
The biggest drawback is that as the number of inputs grows, the table becomes more complicated.
Decision Table Testing's Scope
When data is complicated and every possible combination must be checked, decision tables can quickly grow to be enormous. You may intelligently minimize the number of options in each option to only select the ones that are intriguing and significant. Collapsed Decision Table Testing is the name for this method.
The redundant criteria that are unrelated to the outcome are eliminated in this procedure, and various outputs are created. In order for the tester to execute more effective testing, an additional layer of analysis is added to the test design.
Decision tables are a dependable specification-based testing tool that may be used in a variety of contexts. The tabular and graphical representations are very easy to grasp for all stakeholders and non-technical people.
Through instructive examples and real-life scenarios, project team members may quickly get thorough insights into the topic at hand.
The usefulness and efficiency of this testing approach may be realized by proceeding to the next level of collapsible decision-making table.
- Related Articles
- What is Spike Testing? Learn With Example
- Path Testing & Basis Path Testing with Example
- What is Recovery Testing? With Example
- Keyword Driven Testing Framework with Example
- End-to-End Testing Tutorial: What is E2E Testing with Example
- Payment Gateway Testing with Example Test Cases
- What is SOA Testing? Tutorial with Example
- Learn V-Model in Software Testing
- Software Testing Methodologies – Learn QA Models
- What is Software Testing Metrics with Types & Example?
- What is Negative Testing(Test cases with Example)?
- What is Non-Functional Testing? Types with Example
- What is System Integration Testing (SIT) with Example
- What is Usability Testing? UX (User Experience) Testing Example
- Mutation Testing in Software Testing – Mutant Score & Analysis Example