The Future of Software Development - Devin AI Innovative Approach.pdf
Swe3643 2006 Decision Table Based Testing
1.
2. Components of a Decision Table C1 C2 C3 a1 a2 a3 a4 a5 T T T T F F F F T T F F T T F F T F T F T F T F x x x x x x x x x x x x x x conditions actions values of conditions actions taken R1 R2 R3 R4 R5 R6 R7 R8 rules Read a Decision Table by columns of rules : R1 says when all conditions are T, then actions a1, a2, and a5 occur
3.
4.
5.
6.
7.
8. A Decision Table for Next-Date Condition 1 Condition 2 Condition 3 Month input T T T T F F F F T T F F T T F F T F T F T F T F There are 2 3 = 8 test conditions (8 columns) for the month value. But ------- are these really “independent” conditions ?
9. Decision Table for Next-Date Condition 1 Condition 2 Condition 3 Month input T T T T F F F F T T F F T T F F T F T F T F T F Remember : Condition 1: 1 < = m <= 12 Condition 2: m < 1 Condition 3: m > 12 R1 R2 R3 R4 R5 R6 R7 R8 Note that: a) If condition 1 is true, then conditions 2 and 3 must both be false. So Rules 1 – 4 is reduced to just R4. b) If condition 1 is false, then only one of the conditions 2 / 3, not both, can be true. So, rule R5 can be eliminated. c) Not all three conditions can be false. So rule R8 can be eliminated. That leaves only 3 conditions ---- R4, R6, and R7 (resembles “exclusive OR” ?! ) √ √ √
10. Decision Table for Next-Date with Actions Condition 1 Condition 2 Condition 3 Month input T T T T F F F F T T F F T T F F T F T F T F T F Remember : Condition 1: 1 < = m <= 12 Condition 2: m < 1 Condition 3: m > 12 R1 R2 R3 R4 R5 R6 R7 R8 √ √ √ Action 1 Action 2 - - - X - X X - - - X X - - - - Note that R3 has an action defined in the Decision Table. This should trigger a question because the condition can not happen. There should be no action defined for R3 ---- perhaps, a Specification error ? Assume actions defined in the requirements doc.