Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 17

DECISION TABLE BASED TESTING

DECISION TABLE BASED TESTING


Decision table testing is a software testing technique used to test system behavior
for different input combinations.
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.
DECISION TABLE BASED TESTING
A Decision Table is a tabular representation of inputs versus rules/cases/test
conditions.
It is a very effective tool used for both complex software testing and requirements
management.
A decision table helps to check all possible combinations of conditions for testing
and testers can also identify missed conditions easily.
The conditions are indicated as True(T) and False(F) values.
EXAMPLE 1: HOW TO MAKE DECISION BASE TABLE FOR
LOGIN SCREEN
EXAMPLE 1: HOW TO MAKE DECISION BASE TABLE FOR
LOGIN SCREEN
EXAMPLE 1: HOW TO MAKE DECISION BASE TABLE FOR
LOGIN SCREEN
HOW TO CREATE A DECISION TABLE FOR TESTING?

Step 1: Creating the first column of the table by understanding the requirements.
We will create the first column of the table by taking a look at what we need to test. For this
example, consider an example of an ATM Transaction. Following would be its conditions and
actions:
Condition

The withdrawal amount is less than or equal to the


bank balance
Credit granted

Action

Withdrawal Request Accepted


HOW TO CREATE A DECISION TABLE FOR TESTING?

Step 2: Adding More Columns.


Now that the first column is done, we will calculate the remaining number of columns
needed. It will depend on the number of conditions on the hand and also how many
alternatives are available for these conditions.
Mathematically, the number of columns is 2x, where X is the number of conditions.
For ease of testing, we should create smaller decision tables then create a huge one. Once
done with the number of columns, we can fill in True or False. You can fill the cells in the
following pattern:
HOW TO CREATE A DECISION TABLE FOR TESTING?

Condition

The withdrawal amount is less than or equal to the bank T F T F


balance
Credit granted T T F F

Action

Withdrawal Request Accepted


HOW TO CREATE A DECISION TABLE FOR TESTING?

Step 3: Making the table smaller.


We can reduce the table by removing any duplicate columns in the table. Other
ways to reduce the table are checking for invalid combinations in the table; for
example, there is no way someone can be both a Male and a Female in a decision
table.
We will also have to mark cells with insignificant values with “-“ For example, it
won’t matter if the credit is granted if the amount is <= Account balance.
HOW TO CREATE A DECISION TABLE FOR TESTING?

Condition
The withdrawal amount is less than or equal T F T F
to the bank balance
Credit granted – T – F
Action
Withdrawal Request Accepted
HOW TO CREATE A DECISION TABLE FOR
TESTING?

Step 4: Determining the actions for the table.


Now, with the help of our requirements, we will determine the actions of the table.
These columns will then be named such as R1 / Rule 1, R2/ Rule 2, etc.
Condition Rule 1 Rule 2 Rule 3
The withdrawal amount is less than or equal to T F F
the bank balance
Credit granted – T F
Action
Withdrawal Request Accepted T T F
HOW TO CREATE A DECISION TABLE FOR TESTING?

Now that the table is made reduced and its actions are determined, we can
write test cases for the table. For full coverage of business rules, we should write at
least one test case for each column.
For example:
Test Case for R1 : Balance = 1000, Withdrawal Request = 1000. Result: Withdrawal
Request Accepted
Test Case for R2 : Balance = 1000, Withdrawal Request = 500. Credit Granted: Yes,
Result: Withdrawal Request Accepted
Test Case for R3 : Balance = 1000, Withdrawal Request = 1500. Credit Granted: No,
Result: Withdrawal Request Denied
EXAMPLE 2
A company’s employees are paid bonuses if they work more than a year in the
company and achieve individually agreed targets.
Try to list out all the conditions and actions mentioned in the requirements. Hopefully,
you would have listed out the conditions as listed below.
Conditions:
Employment for more than 1 year?
Agreed target?
Achieved target?
Actions / Outcome :
Bonus payment?
ADVANTAGES
Decision Table Testing is easy to interpret, and hence these are used for development and
business.
A Decision Table Testing helps in making effective combinations, and once made, it can
provide better coverage for testing.
It is fairly easy to turn business conditions into decision tables, even if the conditions are
complex in nature.
If the testing team is looking for 100% coverage and the number of input combinations is low,
Decision Table Testing is one of the most efficient ways of getting the job done.
Decision Testing works where boundary value analysis and equivalent partitioning do not, i.e.,
When the system behavior is different for different inputs.
REFERENCES
https://www.guru99.com/decision-table-testing.html

https://www.educba.com/decision-table-testing/

http://www.softwaretestinglessons.com/decision-table-testing-example/

You might also like