software-testing
  1. software-testing-decision-table

Decision Table

A decision table is a black-box testing technique that focuses on testing the combinations of different inputs and corresponding outputs. It is used to identify gaps in test coverage, eliminate redundant test cases and define the precise requirements for a given scenario.

Syntax

The syntax of a decision table is as follows:

Input Condition Input Condition ..... Output Action
True True ..... Action 1
True False ..... Action 2
False True ..... Action 3
False False ..... Action 4

Here, the input conditions are listed in the first row, and the corresponding output actions are listed in the last row. The values in the rows in between represent the different combinations of inputs and outputs that need to be tested.

Example

Consider an example of a bank's loan application processing system. We can create a decision table for this system as follows:

Customer Credit Rating Loan Amount Requested Collateral Offered Approved Loan Amount
High <= 500,000 None 90% of Loan Amount
High <= 500,000 Any 95% of Loan Amount
High > 500,000 None Requires Approval
High > 500,000 Any 80% of Loan Amount
Low <= 250,000 None 70% of Loan Amount
Low <= 250,000 Any 85% of Loan Amount
Low > 250,000 None Requires Approval
Low > 250,000 Any 60% of Loan Amount

In this example, the input conditions are the customer's credit rating, loan amount requested, and collateral offered (if any). The output action is the approved loan amount. By testing all of the input combinations, we can ensure that the system behaves as expected for all possible scenarios.

Output

The output of a decision table is a table that lists the input conditions and corresponding output actions for all possible combinations of inputs.

Explanation

A decision table is used to test the combinations of inputs and outputs in a system. By listing all possible combinations in a table, testers can ensure that the system behaves as expected for all possible scenarios.

Use

Decision tables are useful for identifying gaps in test coverage, eliminating redundant test cases and defining the precise requirements for a given scenario. They can also help in designing and building robust test cases.

Important Points

  • Decision tables should only be created after the requirements have been defined and understood.
  • It is important to ensure that all possible input combinations have been included in the decision table.
  • Each input and output combination should be clear and unambiguous.
  • The output action should be directly linked to the corresponding input conditions.

Summary

A decision table is a black-box testing technique that is used to test the combinations of inputs and outputs in a system. By listing all possible combinations in a table, testers can ensure that the system behaves as expected for all possible scenarios. It is important to ensure that all possible input combinations have been included in the decision table and that the output action is directly linked to the corresponding input conditions.

Published on: