Date post: | 25-Jun-2015 |
Category: |
Design |
Upload: | sabik-thazhathedhil |
View: | 531 times |
Download: | 1 times |
A useful testing technique and more…
Definition Application areas Steps to create a
decision table Exercise Solution to
exercise
2
Decision tables are used to lay out in tabular form all possible situations which a business decision may encounter.
A decision table lists causes and effects in a matrix. Each column represents a unique combination.
Purpose is to structure logic
3
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
Consists of three parts Condition stubs▪ Lists condition relevant to decision
Action stubs▪ Actions that result from a given set of
conditions Rules▪ Specify which actions are to be followed for a
given set of conditions
4
Business Analysis Programming Testing Hardware Design etc
5
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 combinations5. Check covered combinations6. Add effects to the table
6
Hints: Write down the
values the cause/condition can assume
Cluster related causes
Put the most dominating cause first
Put multi valued causes last
7
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
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
8
Number of Values to the power of the number of causes with these values
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.
9
Find indifferent combinations – place a ‘-’
10
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
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
11
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
Read column by column and determine the effects
One effect can occur in multiple test combinations
12
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
A marketing company wishes to construct a decision table to decide how to treat clients according to three characteristics: Gender, City Dweller, and age group: A (under 30), B (between 30 and 60), C (over 60). The company has four products (W, X, Y and Z) to test market. Product W will appeal to female city dwellers. Product X will appeal to young females. Product Y will appeal to Male middle aged shoppers who do not live in cities. Product Z will appeal to all but older females.
13
--Identify Conditions & Values The three data attributes tested by
the conditions in this problem are 1. gender, with values M and F; 2. city dweller, with value Y and N; and 3. age group, with values A, B, and C
as stated in the problem.
14
2. Compute Maximum Number of Rules The maximum number of rules is 2 x 2 x 3 = 12
3. Identify Possible Actions The four actions are: market product W, market product X, market product Y, market product Z.
4. Enter All Possible Rules The top of the table would look as follows: Note that all combinations of values are present.
15
16