Decision Table Testing
Case Study
• A credit card company have a different cash back policy
depending on the purchase by the customer. In order to test the
software that calculates the cash back percentage, we can
identify the ranges of balance values that earn the different cash
back %.
• If shopping in the range of Rs 0 up to Rs 10000 has a 10% cash
back %,
• If shopping over Rs 10000 and up to Rs 50000 has a 20 % cash
back %,
• If shopping of Rs 50000 and over have a 30% cash back %.
Decision Table Testing
• The decision table shows dependencies among different inputs
and their effects on the outputs.
• Decision tables provide a systematic way of stating complex
business rules, which is useful for developers as well as for
testers
• Decision tables aid the systematic selection of effective test
cases and can have the beneficial side-effect of finding
problems and ambiguities in the specification.
Case Study
• Continue the example of credit card company. To attract
customers company introduced a discount scheme.
• If you are a new customer opening a credit card account, you
will get a 15% discount on all your purchases today.
• If you are an existing customer and you hold a loyalty card, you
get a 10% discount.
• If you have a coupon, you can get 20% off today (but it can't be
used with the 'new customer' discount
Solution
Conditions Rule Rule Rule Rule Rule Rule Rule Rule
1 2 3 4 5 6 7 8
New Customer (15 T T T T F F F F
%)
Loyalty card (10 %) T T F F T T F F
Coupons (20 %) T F T F T F T F
Actions
Discount ( % ) X X 20 15 30 10 20 0
Advantages and Disadvantages
Advantages
• The systematic and very formal approach in defining a decision
table with all possible combinations may reveal combinations
which are not included in other test design techniques
Disadvantages
• The table may grow very quickly and loose readability when
number of conditions and dependent actions increases