Your Cart
No products in the cart.

What is Decision Table: Learn How to Test Complex Business Logic

Decision table testing is a software testing technique used to lay out the Software’s behavior by providing various user inputs and the expected outcome. Decision tables can be used in all situations where the outcome depends on the combinations of different choices, and that is usually very often. In many systems there are tons of business rules where decision tables add a lot of value. The second point that I wanted to make was that it isnn't always necessary to write out all combinations of conditions and then refine/prune. In this example we essentially have a logical AND between the conditions 'ID valid', 'Password valid' and 'Access to system' (assuming my interpretation of this last condition is correct). Using MC/DC coverage criteria we can derive variants of the test cases TC1, TC2, TC4 and TC5.

decision table testing

This is a systematic approach where the different input combinations and their corresponding system behavior (Output) are captured in a tabular form. That is why it is also called as a Cause-Effect table where Cause and effects are captured for better test coverage. Simple decision tables have a single set of conditions, and each condition directly maps to an action or outcome. They are suitable for scenarios where the relationship between inputs and outputs is straightforward and linear.

Components of a Decision Table

Decision tables are a powerful specification-based test design technique that can be used for a variety of scenarios. The graphical representation is also a great benefit for working with stakeholders and nontechnical members of the project team because it provides an illustrative example that is easily understood by everyone. So, this was an example of building a decision table in software testing. Shahzeb currently holds the position of Senior Product Marketing Manager at LambdaTest and brings a wealth of experience spanning over a decade in Quality Engineering, Security, and E-Learning domains.

If the requested amount is less than or equal to the account balance it does not matter if credit is granted. In the next step, you can delete the columns that have become identical. Let’s take an example scenario for an ATM where a decision table would be of use. When I hit the 3rd invalid attempt,  access to system flag should become 'N'. Here we explore different types of Selenium locators and learn how they are used with different automation testing.

Likewise, output is the expected result of what the software application should do or produce in response to different input conditions. It encompasses information about various rules, test conditions, and inputs as perceived by the tester, represented as 'Yes' or 'No,' 'True' or 'False,' 'Y' or 'N,' and similar variations. This proves instrumental in facilitating both straightforward and complex software testing. Decision table testing is a software testing technique used to test system behavior for different input combinations.

Black-box testing: how to make the most of specification and requirements

Test design techniques are methods used to create test cases that cover all possible scenarios and use cases of the software application being tested. Several test design techniques are available, each with its own strengths and weaknesses. In this chapter, we will discuss some of the popular test design techniques. The condition alternatives are simple Boolean values, and the action entries are check-marks, representing which of the actions in a given column are to be performed. However, it has some notable drawbacks, such as increased time consumption, potential security and performance scanning issues, and the requirement for expert testers to maintain the tables. Despite these drawbacks, decision table testing is highly recommended, given its ability to provide comprehensive coverage for different scenarios.

decision table testing

Let’s look at a real example to understand the decision table process in detail. In other words, for a table with 8 columns, the first row will read TFTFTFTF, the second row will read TTFFTTFF and the third row will read TTTTFFFF. By adding this additional layer of analysis to the test plan design, the tester can provide more effective and efficient testing.

Decision table testing is a way to test software by trying out different combinations of inputs. It is especially useful for testing complex business logic, where the system's behavior changes depending on the specific inputs. Decision tables can also be used to reduce the number of test cases that need to be created. By eliminating redundant or irrelevant scenarios, it can help testers to save time and effort and create more comprehensive and well-thought-out test cases. By clearly defining the inputs, conditions, actions, and expected results for each test case, decision tables can help to reduce the risk of human error.

What is Decision Table: Learn How to Test Complex Business Logic

They can also be applied when the action of the software depends on many logical decisions. The name itself signifies a limited number of included inputs and actions in this table. Since there is less data in this decision table, it becomes easy for testers to manage and handle them effectively. It's often used for testing scenarios with few input conditions and corresponding outcomes.

define decision table

In this case, the first and third column are equal, therefore one of them is removed. Through conferences, training, consulting, and online resources, TechWell helps you develop and deliver great software every day. Strong quality assurance professional with a Master’s Degree focused in Quality Management from Eastern Michigan University and CTFL & CTAL-TA certifications from ASTQB. You actually mean the Action of the system is returning an specific Error message that you are locked out.

decision table testing

Deconstructing the problem and identifying its constituent elements is an essential part of this process. Extended decision tables incorporate additional information such as priority levels, test data, or expected results into the table. You can have as many conditions in an unlimited entry decision table (Condition 1, Condition 2, ..., Condition N) as needed. They may be named R1/Rule 1, R2/Rule 2 and so on, but you can also give them more descriptive names.

The decision table gives a visual representation of different input conditions and their related action that allows easy evaluation of all possible combinations. This enables comprehensive coverage of various input conditions to assess the software application’s responses comprehensively. Thus, it helps the testing of extensive datasets, which allows the streamlining of the testing activities and evaluation of the complete Software Testing Life Cycle (STLC). Such factors directly impact the functionality of the software applications because different combinations of conditions or inputs will lead to diverse test outcomes or actions. It is very important that testers and developers understand and manage such conditions and inputs to ensure that developed software applications function accurately. We can say that the decision table represents complex conditional logic that eventually directs and guides the testing strategies.

Imagine you have been assigned the responsibility of verifying the compatibility of a web application across various web browsers and operating systems. To accomplish this task, we will construct a decision matrix delineating multiple test scenarios and their anticipated outcomes. Now let’s complete the decision table with the actions, the rules to apply, and calculate the total discount for each case. At least one test case per column gives full coverage of all business rules. The number of columns depends on the number of conditions and the number of alternatives for each condition. If there are two conditions and each condition can be either true or false, you need 4 columns.

  • The decision table gives a visual representation of different input conditions and their related action that allows easy evaluation of all possible combinations.
  • In this example, the decision table helps determine the loan approval status based on different combinations of credit score, income, and loan amount ranges.
  • In this article, we will explore decision table testing in-depth, providing practical examples to illustrate its application and benefits in real-world scenarios.
  • Decision tables are a concise visual representation for specifying which actions to perform depending on given conditions.
  • This decision table captures the different pricing scenarios based on the product category, customer type, and active promotions.
  • The testers use these to seek clarity on the decision-making process during the Software Development Life Cycle (SDLC) as they provide a structured way to handle decision logic and have expected outcomes.

This technique can make sure of good coverage, and the representation is simple so that it is easy to interpret and use. We can conclude that using Decision Tables proves to be a fundamental technique in Software testing. It is a technique that not only the testers can use but can also be utilized by anyone to break down any complex requirement with just a straightforward table of input combinations vs. expected results. https://www.globalcloudteam.com/ provides a way to guarantee a good test case coverage since the technique makes you cover all the combinations for the inputs that are defined in the requirements. I answered based on my understanding that the system should show an error message, even though I had not covered that scenario in my list. My team lead gave me some great advice back then; if I had used the decision table technique, I wouldn’t have missed that scenario.

I think you are misreading what "Access to system?" means; it is a condition not an action. In TC4,  the person is entering their valid userid and password, but in the case of that being done after their 3rd failed login attempt they do not have access to the system. So even though I entered a valid user/password combination becuase I don't have access to the system I should see the account is locked message. Using decision tables is not always easy, but in my experience, the results reaped from the exercise are always worth the effort. Try this technique to make your test design process more efficient, effective, and understandable.

Add a Comment

Your email address will not be published.

All Categories

Quick Call

Talk to an expert