58 Software teSting interview QueStionS
(i) Can you explain deCision taBles?
As the name suggests they are tables that list all possible inputs and all possible
outputs. A general form of decision table is shown in the following figure.
Condition 1 through Condition N indicates various input conditions. Action 1
through Condition N are actions that should be taken depending on various
input combinations. Each rule defines unique combinations of conditions
that result in actions associated with that rule.
The following is a sample decision table for a discount which depends on
age. Discounts are only allowed if you are married or a student. The following is
the decision table accordingly. Using the decision table we have also derived our
test cases. Because this is a sample example we cannot see the importance of the
Figure 62 General decision tables
Figure 63 Discount Decision table