Decision Table Based Testing-Black Box Software Testing Technique
Of all the functional testing methods, those based on decision tables are the most rigorous because decision tables enforce logical rigour.
What are Decision Tables?
Decision tables are precise and compact way to model complicated logic. They are ideal for describing situations in which a number of combinations of actions are taken under varying sets of conditions.
It is another popular black box testing. A decision table has following four portions
(a) Stub portion
(b) Entry portion
(c) Condition portion, and
(d) Action portion
Structure of decision table: Please refer following decision table
A column in the entry portion is known as a rule. Rules indicate which actions are taken for the conditional circumstances indicated in the condition portion of the rule. Decision tables in which all conditions are binary are known as �Limited entry decision tables�. If conditions are allowed to have several values, the resulting tables are known as �Eextended entry decision tables�.
Following steps are used to identify the test cases with decision tables:
Step – 1: For a module, identify input conditions (causes) and action (effect).
Step – 2: Develop a cause-effect graph.
Step – 3: Transform this cause-effect graph, so obtained in step 2 to a decision table.
Step – 4: Convert decision table rules to test cases.
Each column of the decision table represents a test case. That is,
Number of Test Cases = Number of Rules
For a limited entry decision tables, if n conditions exist, there must be 2n rules.
What are the Advantages of Decision Tables:
1. This type of testing also works iteratively. The table that is drawn in the first iteration, acts as a stepping stone to derive new decision table(s), if the initial table is unsatisfactory.
2. These tables guranatee that we consider every possible combination of condition values. This is known as its “completeness property”. This property promises a form of complete testing as compared to other techniques.
3. Decision tables are declarative. There is no particular order for conditions and actions to occur.
What are the Disadvantages of Decision Tables:
Decision tables do not scale up well. We need to “factor” large tables into smaller ones to remove redundancy.
Applications of Decision Tables:
This technique is useful for applications characterized by any of the following
(a) Prominent if-then-else logic.
(b) Logical relationships among input variables.
(c) Calculations involving subsets of the input variables.
(d) Cause-and-effect relationships between inputs and outputs.
(e) High cyclomatic complexity.
Technique of using Decision Table:
To identify test cases with decision tables, we interpret conditions as inputs and actions as output. The rules are interpreted as test cases. Because the decision table can mechanically be forced to be complete, we know we have a comprehensive set of test cases.
Guidelines for Decision Table Based Testing:
The following guidelines have been formulated after studying above examples
1) This technique works well where lot of decision making takes place such as the triangle problem and Next date problem.
2) The decision table technique is indicated for applications characterized by any of the following > Prominent if-then-else logic.
# Logical relationships among input variables.
# Calculations involving subsets of the input variables.
# Cause-and-effect relationships between inputs and outputs.
# High cyclomatic complexity.
3) Decision tables do not scale up well. We need to ‘factor’ large tables into smaller ones to remove redundancy.
4) It works iteratively meaning that the table drawn in the first iteration, acts as a stepping stone to design new decision tables, if the initial table is unsatisfactory.
An expert on R&D, Online Training and Publishing. He is M.Tech. (Honours) and is a part of the STG team since inception.