Decision Table-Based Testing Decision Tables - Wikipedia
Decision Table-Based Testing Decision Tables - Wikipedia
A precise yet compact way to model complicated logic Associate conditions with actions to perform Can associate many independent conditions with several actions in an elegant way
1 2
Chapter 7
Printer Troubleshooting DT
Printer does not print Conditions A red light is flashing Printer is unrecognized Heck the power cable Check the printer-computer cable Actions Ensure printer software is installed Check/replace ink Check for paper jam
X X X X X X Y Y Y Y Y Y N Y N N N Y Y N N Y N N N N
Rules 3,4 T F -
Rule 5 Rule 6 F T T X X F T F
Rules 7,8 F F -
T T F X
N Y X X X
N Y
X X X
F X
T F X
T T F X
T T T T T T T T T T T T T T F T F T
T T T
T T T T T T
M2 D2 -
M2 D3 -
M2 D4 -
D1 -
T T T T T T T T T T
C3: year in A1: Impossible A2: Increment day A3: Reset day T T T X X X A4: Increment month A5: reset month A6: Increment year
T T T
T T T
T T
M3 D1 Y1
M3 D1 Y2
M3 D1 Y3
M3 D2 Y1 X
M3 D2 Y2
M3 D2 Y3 X
M3 D3 X
M3 D3 X
X X X X X X X
12
M1 D1 X
M1 D2 X
M1 D3 X
M1 D4 -
M1 D5 X
M2 M2 M2 D1 X D2 X D3 X
M2 M2 D4 X X X D5 -
A3: Reset day A4: Increment month A5: reset month A6: Increment year
X X
14
Applicability
The specification is given or can be converted to a decision table . The order in which the predicates are evaluated does not affect the interpretation of the rules or resulting action. The order of rule evaluation has no effect on resulting action . Once a rule is satisfied and the action selected, no other rule need be examined. The order of executing actions in a satisfied rule is of no consequence. 16
Applicability
The restrictions do not in reality eliminate many potential applications.
In most applications, the order in which the predicates are evaluated is immaterial. Some specific ordering may be more efficient than some other but in general the ordering is not inherent in the program's logic.
17
18
20
Logic function
The logic function for the example is Z = AB~C + AD Several techniques to derive it
Karnaugh maps Cause-effect graphs
A logic function maps n boolean input variables to a boolean output variable A truth table is an enumeration of all possible input and output values
23
Negation variants
Candidate set number 2 3 4 6 7
25
Each variant creates a test candidate set Unique true point candidate sets in boiler example: {12} {9,11,15}
Test suite
Candidate sets 12 14 8 4,5 9,11,15 8,10,14 1,3,5,7 Minimum Test suite 5 8 9 12 14
27
28