Decision table testing is a popular software testing technique used by testers worldwide. It is also known as a cause-effect technique, where the cause and effects of the test are written. Further, we conduct different test cases in decision table testing to check the system’s behavior.
Simply, decision table testing is a black box testing technique used to test multiple input combinations under different circumstances.
What is a Decision Table?
A decision table consists of data on various rules, test conditions, and inputs by the tester. The inputs are inserted as ‘Yes’ or ‘No,’ ‘True’ or ‘False’, ‘Y’ or ‘N,’ etc. It helps in easy and complicated software testing.
With the help of this table, you can conclude all the possible combinations of testing the software. Moreover, it eliminates the chances of risk and provides security to the system.
Here is an example for a better understanding of the topic-
|Condition||Input 1||Input 2||Input 3|
|Withdrawal Amount <= Balance||T||F||F|
This example indicates the test cases for a user withdrawing money from the ATM machine.
Every column of the above table consists of business logic and usually combinations of different circumstances. Additionally, you can see the actions related to those situations in the ‘Actions’ column.
As you can see, this type of software testing is a structural representation hugely beneficial for complex business rules. Now take a look at different types of decision tables.
- Limited Entry: The condition entries in this category are restricted. For instance, true or false.
- Extended Entry: Here, the entries can have more than two values apart from ‘true’ or ‘false.’
Here are some of the common notations used for decision tables.
- Y can also be used for True. You can also use T or 1.
- N means False. You can also refer to it as F or 0.
- – indicated condition doesn’t matter. You can also mark it as N/A.
What is Decision Table Testing?
It is a software testing approach to validate a system’s behavior for various combinations of input. In this approach, professionals record the input combinations and their corresponding system behavior, i.e., output, in a table, as you can see in the above examples of decision tables.
Decision tables are to as referred to as Cause-Effect tables, as they contain the causes and their respective effects in a table. They help in better test coverage.
Importance of Decision Table Testing
Although other testing techniques, such as boundary value testing and equivalence class partitioning testing, cover different circumstances, a bone of contention arises when the system shows different input behaviors.
This is where decision table testing proves to be helpful.
Decision table testing helps to cover various input conditions to check the system’s behavior in and out. It also includes testing large data sets, making it easier for bigger organizations to scan their overall system efficiently.
Moreover, it is a simple test where evaluating different behaviors is quick. Here are some more points that depict the importance of decision table testing:
- Helps testers to understand the impact of combinations of inputs while implementing business rules.
- In complicated business rules, the structured approach helps understand the company’s requirements deeply.
- Serves as a beneficial approach for the developers in the development process.
- Helps the testing team to design tests more efficiently.
- Saves the time and energy of the testers to rewrite test cases and scenarios.
Top Advantages of Decision Table Testing
- Decision table testing, a as black box testing technique, is an efficient method for testers.
- It is an excellent way of analyzing complex business rules.
- Users can expect comprehensive coverage of test cases with all the possible unique input combinations. This ensures that your system is capable of tackling multiple circumstances.
- Automating decision table testing using several software tools is possible. It helps save time and energy for both developers and testers.
- It gives you an opportunity to find any missing requirements in both easy and complex test scenarios. Hence guarantees to cover all the probable conditions whatsoever.
Disadvantages of Decision Table Testing
- Although the testing is efficient and beneficial, it can be a little time-consuming. The more time, the more will be the testing costs. So, this is one of the major setbacks.
- As mentioned above, decision table testing provides the output as ‘true’ or ‘false.’ Therefore, it lacks to provide other important data related to the security and overall performance of the software.
- This testing requires skillful and expert testers to handle complex decision tables, as there are many inputs in complex tables. Beginners may struggle to manage the tables.
- Whenever there are any changes in the software, it is mandatory to incorporate the same in the decision tables. Therefore, you must maintain and update them frequently, which will result in more costs and efforts by the team.
- Such tables do not provide information about user experience or the overall quality of the software system.
Examples of Decision Table Testing
For a better understanding, find more examples of decision table testing below:
- Login System
In the login system, the decision table can consist of inputs like username and password. You can insert the conditions, such as an invalid password or an invalid username. If the information doesn’t match the user’s actual credentials, the table can show the output with an error message to the user.
|Result (Action)||Open Account||Invalid Password||Invalid Username||Invalid Username and Password|
Case 1: username and password both are correct.
Case 2: username is correct, but the password is not.
Case 3: username is incorrect, but the password is correct.
Case 4: username and password are both incorrect.
Check out: Test Cases for Login Page
- Traffic Light System
You can easily create a decision table for testing the traffic light system. The table below shows the inputs like the working state of every traffic light in the area, signs at the traffic light, and the presence of traffic police. Further, the actions tell whether the traffic lights, priority signs, or the traffic police regulate the traffic.
|Traffic light state (working or not)||T||T||T||T||F||F||F||F|
|Traffic Police Presence||T||F||T||F||T||F||T||F|
|Regulated by traffic lights||–||T||–||T||–||–||–|
|Regulated by priority signs||–||–||–||–||–||T||–|
|Regulated by traffic police||T||–||T||–||T||–||T|
|Allow traffic to move||–||–||–||–||–||–||–||T|
- Chemical Factory Inventory
This is an example of a decision table for a chemical factory. The table below shows the conditions and actions the company must take in different circumstances.
|Is the customer authorized?||F||T||T||T||T|
|Availability of chemical||–||F||T||T||T|
|Is the chemical hazardous?||–||–||F||T||T|
|Is the customer trained?||–||–||–||F||T|
As you can see, decision table testing is one of the most popular and efficient testing techniques in software testing. You can use this approach in a variety of scenarios and contexts. Further, the tabular representation helps in the easy analysis of business rules.
Overall, decision table testing provides the freedom to insert numerous inputs, is easy to understand, and is suitable for small and large organizations.
However, some notable drawbacks remain extra time consumption, lack of scanning security and performance, and the need for expert testers to maintain the tables.
Nonetheless, with the provision of good coverage for different circumstances, you must opt for decision table testing!