decision table training session
TRANSCRIPT
![Page 1: Decision table training session](https://reader038.vdocuments.site/reader038/viewer/2022100602/558cc5b2d8b42ae8608b4616/html5/thumbnails/1.jpg)
Decision Tables
A useful testing technique and more…
Marien de Wilde, Solution Architect
![Page 2: Decision table training session](https://reader038.vdocuments.site/reader038/viewer/2022100602/558cc5b2d8b42ae8608b4616/html5/thumbnails/2.jpg)
February 2010 2
In this session …
DefinitionApplication areasSteps to create a
decision tableExerciseSolution to exercise
![Page 3: Decision table training session](https://reader038.vdocuments.site/reader038/viewer/2022100602/558cc5b2d8b42ae8608b4616/html5/thumbnails/3.jpg)
February 2010 3
Definition
ComponentsA decision table lists
causes and effects in a matrix. Each column represents a unique combination.
Purpose is to structure logic
Cause = conditionEffect = action = expected results
Causes Values 1 2 3 4 5 6 7 8Cause 1 Y, N Y Y Y Y N N N NCause 2 Y, N Y Y N N Y Y N NCause 3 Y, N Y N Y N Y N Y NEffectsEffect 1 X X XEffect 2 X X X
Combinations
![Page 4: Decision table training session](https://reader038.vdocuments.site/reader038/viewer/2022100602/558cc5b2d8b42ae8608b4616/html5/thumbnails/4.jpg)
February 2010 4
Application Areas
Business AnalysisProgrammingTestingHardware Design etc
![Page 5: Decision table training session](https://reader038.vdocuments.site/reader038/viewer/2022100602/558cc5b2d8b42ae8608b4616/html5/thumbnails/5.jpg)
February 2010 5
Steps to Create a decision table
1. List all causes in the decision table
2. Calculate the number of possible combinations
3. Fill columns with all possible combinations
4. Reduce test combinations
5. Check covered combinations
6. Add effects to the table
![Page 6: Decision table training session](https://reader038.vdocuments.site/reader038/viewer/2022100602/558cc5b2d8b42ae8608b4616/html5/thumbnails/6.jpg)
February 2010 6
Step 1: List all causes
Hints:Write down the values
the cause/condition can assume
Cluster related causesPut the most
dominating cause firstPut multi valued
causes last
Causes Values 1 2 3 4 5 6 7 8Cause 1 Y, N Y Y Y Y N N N NCause 2 Y, N Y Y N N Y Y N NCause 3 Y, N Y N Y N Y N Y NEffectsEffect 1 X X XEffect 2 X X X
Combinations
![Page 7: Decision table training session](https://reader038.vdocuments.site/reader038/viewer/2022100602/558cc5b2d8b42ae8608b4616/html5/thumbnails/7.jpg)
February 2010 7
Step 2: Calculate combinations
If all causes are simply Y/N values:2number of causes
If 1 cause with 3 values and 3 with 2:31 * 23 = 24
Or, use the Values column and multiply each value down the column, eg. 3*2*2*2=24
Number of Values to the power of the number of causes with these values
![Page 8: Decision table training session](https://reader038.vdocuments.site/reader038/viewer/2022100602/558cc5b2d8b42ae8608b4616/html5/thumbnails/8.jpg)
February 2010 8
Step 3: Fill columns
Algorithm:
1. Determine Repeating Factor (RF): divide remaining combinations by the number of possible values for that cause
2. Write RF times the first value, then RF times the next etc. until row is full
3. Next row, go to 1.
![Page 9: Decision table training session](https://reader038.vdocuments.site/reader038/viewer/2022100602/558cc5b2d8b42ae8608b4616/html5/thumbnails/9.jpg)
February 2010 9
Step 4: Reduce combinations
Find indifferent combinations – place a ‘-’
Causes Values 1 2 3 4 5 6 7 8Cause 1 Y, N Y Y Y Y N N N NCause 2 Y, N Y Y N N Y Y N NCause 3 Y, N Y N - - Y N Y NEffectsEffect 1 X X XEffect 2 X X X
Combinations
Causes Values 1 2 3 4 5 6 7Cause 1 Y, N Y Y Y N N N NCause 2 Y, N Y Y N Y Y N NCause 3 Y, N Y N - Y N Y NEffectsEffect 1 X XEffect 2 X X X
Combinations Join columns where
columns are identicalTip: ensure the effects are
the same
![Page 10: Decision table training session](https://reader038.vdocuments.site/reader038/viewer/2022100602/558cc5b2d8b42ae8608b4616/html5/thumbnails/10.jpg)
February 2010 10
Step 5: Check covered combinations
Checksum For each column calculate the
combinations it represents A ‘-’ represents as many
combinations as the cause has Multiply for each ‘-’ down the
column Add up total and compare with
step 2
Causes Values 1 2 3 4Cause 1 Y, N Y Y Y NCause 2 Y, N Y N N -Cause 3 Y, N - Y N -EffectsEffect 1 X XEffect 2Checksum 2 1 1 4 8
Combinations
![Page 11: Decision table training session](https://reader038.vdocuments.site/reader038/viewer/2022100602/558cc5b2d8b42ae8608b4616/html5/thumbnails/11.jpg)
February 2010 11
Step 6: Add effects to table
Read column by column and determine the effects
One effect can occur in multiple test combinations
Causes Values 1 2 3 4Cause 1 Y, N Y Y Y NCause 2 Y, N Y N N -Cause 3 Y, N - Y N -EffectsEffect 1 X XEffect 2 X XChecksum 2 1 1 4 8
Combinations
![Page 12: Decision table training session](https://reader038.vdocuments.site/reader038/viewer/2022100602/558cc5b2d8b42ae8608b4616/html5/thumbnails/12.jpg)
February 2010 12
Exercise: SpecificationCreate a decision table
A mailing is to be sent out to customers. The content of the mailing is about the current level of discounting and potential levels of discounting. The content is different for different types of customers.
Customer Types A, B and C get a normal letter except Customer Type C, who get a special letter. Any customer with 2 or more current lines or with a credit rating of ‘X’ get a special paragraph added with an offer to subscribe to another level of discounting.
![Page 13: Decision table training session](https://reader038.vdocuments.site/reader038/viewer/2022100602/558cc5b2d8b42ae8608b4616/html5/thumbnails/13.jpg)
February 2010 13
Solution on next slide
![Page 14: Decision table training session](https://reader038.vdocuments.site/reader038/viewer/2022100602/558cc5b2d8b42ae8608b4616/html5/thumbnails/14.jpg)
February 2010 14
Exercise: possible solution
“2 or more current lines OR credit rating X”. What if both: AND?
Other customer types? See “O-Other” above.
What about non current lines?
Causes Values 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16Customer Type A,B,C,O A A A A B B B B C C C C O O O O2 or more lines Y, N Y Y N N Y Y N N Y Y N N Y Y N NCredit rating = X Y, N Y N Y N Y N Y N Y N Y N Y N Y NEffectsNormal Letter X X X X X X X X ? ? ? ?Special Letter X X X X ? ? ? ?Add. Paragraph ? X X ? X X ? X X ? ? ? ?No Letter ? ? ? ?Checksum 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 16
Combinations
![Page 15: Decision table training session](https://reader038.vdocuments.site/reader038/viewer/2022100602/558cc5b2d8b42ae8608b4616/html5/thumbnails/15.jpg)
February 2010 15
Thank You