What is Decision Table Testing

Decision Table Testing is a black-box testing technique that helps in testing systems or applications that have complex business rules or logic. It involves creating a structured table that lists all possible combinations of inputs and corresponding expected outputs, based on the defined business rules.

The Decision Table consists of four main components:

Conditions: These are the input conditions or variables that affect the outcome of the decision. They represent different states or values that the system can encounter.

Actions: These are the actions or outputs that are expected based on the specific combination of input conditions. They represent the desired behavior or response of the system.

Rules: Each rule represents a specific combination of conditions and the corresponding actions that should be taken. These rules are derived from the business requirements or specifications.

Result: The result section of the table specifies the expected outcome or action for each combination of conditions.

To apply Decision Table Testing, we can follow these steps:

Identify the conditions: Determine the input conditions or variables that influence the decision-making process within the system. These conditions should cover all possible scenarios and combinations.

Define the actions: Identify the actions or outputs that should occur based on the combinations of input conditions. These actions should align with the expected behavior of the system.

Create the Decision Table: Construct a decision table that represents all possible combinations of conditions and the corresponding actions. List the conditions in the leftmost column, the actions in the top row, and fill in the table with the expected outcomes for each combination.

Execute the test cases: Based on the decision table, generate test cases by selecting specific combinations of conditions to cover different scenarios. Test each combination and verify if the actual actions match the expected outcomes.

Validate the results: Compare the actual outputs of the system with the expected outcomes specified in the decision table. If any discrepancies are found, investigate and report them as defects.

Decision Table Testing helps ensure that all possible combinations of conditions and corresponding actions are considered during testing, thus providing comprehensive test coverage. It simplifies the testing process by organizing complex business rules into a structured format, making it easier to identify potential defects and validate the system’s behavior in different scenarios.

Example

Here is a simplified decision table specifically for testing the login functionality of Facebook. We’ll consider two input conditions: Password and Two-Factor Authentication (2FA). The outcomes we’ll examine are “Successful Login” and “Login Failure.”

ConditionFacebook
PasswordValid
Two-Factor AuthenticationEnabled/Disabled
OutcomeSuccessful Login
PasswordInvalid
Two-Factor AuthenticationEnabled/Disabled
OutcomeLogin Failure
PasswordValid
Two-Factor AuthenticationEnabled
OutcomeSuccessful Login
PasswordValid
Two-Factor AuthenticationDisabled
OutcomeSuccessful Login
PasswordInvalid
Two-Factor AuthenticationEnabled
OutcomeLogin Failure
PasswordInvalid
Two-Factor AuthenticationDisabled
OutcomeLogin Failure

In this decision table:

  •  Each row represents a unique combination of input conditions for Facebook’s login.
  • The conditions are Password and Two-Factor Authentication.
  • The outcomes are Successful Login and Login Failure.
  • Various combinations of input conditions are tested for Facebook’s login functionality.

This decision table helps ensure that different scenarios, such as valid and invalid passwords, and the presence or absence of Two-Factor Authentication, are considered during testing for Facebook’s login.