Decision Table in Testing

Decision Table in Testing

In this article, I am going to discuss the Decision Table in Testing. Please read our previous article where we discussed Decision Coverage Testing. At the end of this article, you will understand the following important pointers which are related to the Decision Table in SDLC.

  1. What is Decision Table?
  2. Example to Understand Decision Table in Testing
  3. Different Parts Decision Table
  4. Why Decision Table is Important in Software Testing?
  5. What is the scope of the Decision Table in Testing?
  6. Types of Decision Tables in Testing
  7. What is the Applicability of the Decision Table?
  8. What are the Advantages of the Decision Table?
  9. What are the Disadvantages of the Decision Table?
What is Decision Table?

Decision tables are used to explain complex logical relationships in many technical areas. With the aid of this testing, the software and its requirements management can be tested very successfully. The decision table provides a tabular view of various combinations of input conditions, which are presented as True(T) and False(F) values. The result may depend on several input circumstances. It also provides a list of conditions and the related activities that must be performed during testing. The decision table technique is one of the frequently used case design strategies for black box testing. This is a methodical approach where different input combinations and their associated system behavior are tabulated. Because of this, it is sometimes referred to as a cause-effect table. This method is used to choose test cases in a methodical manner; it reduces testing time and provides adequate coverage of the software application’s testing domain. The decision table method is suitable for functions where there is a logical connection between two or more inputs. This method determines the outcome of different combinations of inputs and is related to the proper combination of inputs. Conditions and actions must be taken into account when designing the test cases using the decision table technique.

Example to Understand Decision Table in Testing

Let’s look at an illustration. We are evaluating a web application’s login feature. Username and password are the only two fields on the login form. Based on various combinations of the inputs, there are three potential outcomes:

  • The user should be given access if their username and password are both accurate.
  • An error message should be displayed to the user if either the username or password is incorrect.
  • A general error message ought to be displayed to the user if both the username and password are incorrect.
Decision Table:
Situation Username Password Expected Outcome
1 Correct Correct Grant Access
2 Incorrect Correct Invalid Username
3 Correct Incorrect Invalid Password
4 Incorrect Incorrect Generic Error

Based on the combination of the inputs—a correct username and a correct password—there are four possible outcomes in this example. There is a predicted consequence for each scenario. This decision table aids in determining the test cases that must be carried out during black box testing in order to cover all potential scenarios and guarantee that the login functionality functions as intended.

Different Parts Decision Table:

The decision table used in software testing is divided into 4 components, which are listed below.

Different Parts Decision Table in Testing

  1. Condition Stubs: In this first top left area of the decision table, the conditions that are used to choose a certain action or set of actions are listed.
  2. Action Stubs: All possible actions are included in the decision table’s first lower left part (below the condition stub).
  3. Condition Entries: In the upper right corner of the decision table, values are inserted for the condition entry. Numerous rows and columns that make up the condition entries area of the table are referred to as rules.
  4. Action Entries: In the lower right corner of the decision table, each item in the action entry has a connected action or a collection of connected actions. “Outputs” are the name given to these values.
Why Decision Table is Important in Software Testing?

A decision table is an excellent tool for managing requirements and testing. The following are some of the factors that make the decision table crucial:

  • The test design technique greatly benefits from the use of decision tables.
  • It aids testers in investigating the results of various input combinations and other software states that apply business rules.
  • It offers a consistent manner of expressing intricate business rules, which is advantageous to both developers and testers.
  • It helps the developer do a better job during the development process. Testing every possible combination might not be feasible.
  • It is the best option for managing tests and requirements.
  • When dealing with intricate business standards, requirements preparation is an organized process.
  • Intricate logic is also modeled using it.
What is the scope of the Decision Table in Testing?

When working with complex data and making sure that every possible combination has been taken into account, decision tables can quickly grow to enormous sizes. If you make wise decisions, you can narrow down the list of options in each option to just select the most intriguing and significant ones. Testing using a collapsed decision table is the name of this method. A number of outputs are generated during this process, and redundant criteria that have no influence on the outcome are deleted. In order to aid the tester in conducting testing more effectively, a second layer of analysis is added to the test design. Decision tables are a trustworthy specification-based testing method that can be used in a variety of circumstances. The tabular and graphical representations are simple to understand for non-technical users and all stakeholders. Through instructional examples and real-world situations, project team members can quickly develop a thorough understanding of the topic at hand. Realizing the usefulness and efficacy of this testing technique may be possible by moving up to the next level of the collapsible decision-making table.

Types of Decision Tables in Testing

Two categories, which are given below, can be used to categorize the decision tables:

Types of Decision Tables in Testing

  1. Limited Entry: In limited entry decision tables, the condition elements can only take on binary values.
  2. Extended Entry: The condition entries of the expanded entry decision table have more than two values. Decision tables with extended entries use many conditions and a variety of outcomes for each condition as opposed to merely true or false.
What is the Applicability of the Decision Table?
  • The order in which the rules are applied does not affect the outcome.
  • The decision tables can only be used effectively at the unit level.
  • After a rule is followed and a course of action is decided upon, another rule must be considered.
  • Many applications are not entirely barred by the restrictions.
What are the Advantages of the Decision Table?

The following benefits of employing decision tables in black box testing can be summed up:

  1. Comprehensive Coverage: Thorough test coverage is achieved by using decision tables, which offer a methodical and structured approach to testing all conceivable combinations of conditions and accompanying actions.
  2. Clarity and Readability: Decision tables make it simpler for testers to comprehend and confirm the intended behavior of the system by providing a clear and concise representation of complicated business rules.
  3. Test Case Creation: Decision tables provide as a guide for creating test cases, allowing testers to come up with a clear list of inputs and expected results while lowering the possibility of missing important instances.
  4. Efficiency: Decision tables enable efficient test design and execution, saving time and effort during the testing process by arranging conditions and actions in a tabular style.
  5. Traceability: Because decision tables clearly show the relationship between requirements, conditions, and actions, testers may follow the development of a particular test case and confirm that it is in line with the functionality that is intended.
  6. Maintainability: Because changes to the criteria or actions may be made directly in the table, decision tables are simple to maintain and update, ensuring that the test cases are always current with changing system requirements.
What are the Disadvantages of the Decision Table?

Although decision tables have certain advantages, they also have significant drawbacks in black box testing. These are the main ideas:

  1. Complexity: As the number of circumstances and actions rises, decision tables may become difficult to handle and complex. They may be challenging to comprehend and sustain as a result.
  2. Scalability: It becomes difficult to manage the combinations of inputs and outputs as decision tables get larger. Testing every combination is feasible, but it can be time-consuming.
  3. Lack of visibility: Decision tables do not give extensive information about the inner workings or functioning of the system under test; instead, they simply give a high-level representation of inputs and outputs. The tester’s comprehension of the underlying processes is so constrained.
  4. Limitations in Fault Detection: Because decision tables concentrate on a small number of input combinations, they may overlook errors or unforeseen events that are not expressly addressed in the table.
  5. Maintenance Burden: Modifying the decision table may be necessary for any system upgrades or modifications, which can be laborious and error-prone, particularly if the table is large or complex.
  6. Lack of Test Coverage: Relying entirely on decision tables may lead to insufficient test coverage because they might not take into consideration all scenarios or edge cases, thus causing problems to go undetected.

In the next article, I am going to discuss All Pair Testing. Here, in this article, I try to explain Decision Table in Testing. I hope you enjoy this Decision Table in Testing article.

Leave a Reply

Your email address will not be published. Required fields are marked *