Blog_Banner_Asset
    Homebreadcumb forward arrow iconBlogbreadcumb forward arrow iconFull Stack Developmentbreadcumb forward arrow iconDecision Table Testing – Advantage and Scope [With Examples]

Decision Table Testing – Advantage and Scope [With Examples]

Last updated:
7th Apr, 2021
Views
Read Time
9 Mins
share image icon
In this article
Chevron in toc
View All
Decision Table Testing – Advantage and Scope [With Examples]

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. 

Check out our free courses to get an edge over the competition.

Explore Our Software Development Free Courses

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.

Check out upGrad’s Full Stack Development Bootcamp (JS/MERN)

Ads of upGrad blog

Why Decision Table Testing is Important?

Decision Table Testing is crucial because it simplifies complex scenarios by mapping inputs to expected outputs, ensuring all possible conditions are tested. It helps identify errors in a systematic way, enhancing test coverage and efficiency. This approach is precious in catching overlooked cases, making software more reliable and user-friendly. 

Decision table testing is important for the following key reasons. 

  • No Head-Scratching Logic: Decision tables are like cheat sheets for tangled decision-making logic. They lay out rules and conditions in a way that even your grandma would nod along. 
  • Test Everything, Miss Nothing: With decision tables, you’re like a detective covering all the bases. There’s no need to worry about missing a crucial clue – it’s all there. 
  • Less Brain Gymnastics: Decision table-based testing makes designing test cases a walk in the park. No need for mental gymnastics; it’s a simple checklist of what to test. 
  • Spotting Goofs Made Easy: They’re like detectives with a magnifying glass, catching any logic slip-ups. If there’s a goof in your decision logic, decision tables will expose it. 
  • Talking the Same Language: Decision tables are like a secret code everyone understands. Developers, testers, and even business analysts who speak in riddles – decision tables ensure everyone gets it. 
  • Decision Logic CliffsNotes: They’re not just for now; decision tables are like a time capsule. Documenting decision logic in a way that’s easy to understand now and even five coffee cups later. 
  • Map to Success: Decision table testing technique leaves breadcrumbs. Test cases can trace their steps to specific rules and conditions, so you always know where you’re headed. 

Advantages Of Decision Table Testing

There are many advantages of decision table testing. Below I have listed the top decision table testing advantages:

  1. Decision tables are one of the most effective and full-proof design testing techniques.
  2. Testers can use decision table testing to test the results of several input combinations and software states.
  3. It gives the developers to state and analyzes complex business rules.
  4. Decision table testing is the most preferred black box testing and requirements management.
  5. 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.
  6. This technique provides comprehensive coverage of all test cases that can significantly reduce the re-work on writing test cases and test scenarios.
  7. Decision tables guarantee coverage of all possible combinations of condition values which are called completeness property.
  8. Decision tables can be used iteratively. The table results created in the first testing iteration can be used for the next and so on.
  9. Decision tables are easy to understand, and everyone can use and implement this design and testing method, scenarios and test cases without prior experience.
  10. Multiple conditions, scenarios and results can be viewed and analyzed on the same page by both developers and testers.

Check out upGrad’s Java Bootcamp

Explore our Popular Software Engineering Courses

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.

 

ConditionsRule 1Rule 2Rule 3Rule 4
Username (T/F)FTFT
Password (T/F)FFTT
Output (E/H)EEEH

In-Demand Software Development Skills

Legend:

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. 

upGrad’s Exclusive Software and Tech Webinar for you –

SAAS Business – What is So Different?

 

Test Scenarios Possible For This Decision Table:

  1. Enter correct username, correct password, and click on login. The expected result is that the user should navigate to the homepage.
  2. Enter correct username, wrong password, and click on login. The expected result is that the user should get an error message.
  3. Enter the wrong username, correct password, and click on login. The expected result is that the user should get an error message.
  4. 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. 

 

ConditionsCase 1Case 2Case 3Case 4Case 5Case 6Case 7Case 8
Format.JPG.JPG.JPG.JPGNot.JPGNot.JPGNot.JPGNot.JPG
Size< 32 kb< 32 kb>= 32 kb>=32 kb< 32 kb< 32 kb>= 32 kb>= 32 kb
Resolution137*177Not 137*177137*177Not

137*177

137*177Not

137*177

137*177Not

137*177

OutputPhoto uploaded successfullyError message due to resolution mismatchError message due to size mismatchError message due to size and resolution mismatchError message due to format mismatchError message due to format and resolution mismatchError message due to format and size mismatchError 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.

Read our Popular Articles related to Software Development

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.   

Ads of upGrad blog

By moving to the next level of collapsed decision-making table, the management can realize the effectiveness and efficiency of this testing technique.    

Conclusion

Decision Table Testing offers a structured and efficient approach to validating complex business logic and systems with multiple conditions. This testing method ensures thorough coverage of scenarios, enhancing the reliability and quality of software applications. The advantages of Decision Table Testing, including its ability to simplify complex test scenarios into manageable tables and ensure comprehensive test case coverage, cannot be overstated. Its application scope spans various industries and domains, proving its versatility and effectiveness in identifying discrepancies and potential errors in system logic. By employing Decision Table Testing, developers and testers can achieve a more systematic, accurate, and efficient testing process, ultimately leading to software products of higher integrity and performance. As we continue to navigate the complexities of modern software development, the strategic implementation of Decision Table Testing remains an indispensable asset in the quest for flawless software solutions.

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.

Profile

Rohan Vats

Blog Author
Software Engineering Manager @ upGrad. Passionate about building large scale web apps with delightful experiences. In pursuit of transforming engineers into leaders.