Sie sind auf Seite 1von 16

A useful testing technique and more

Mohit Arora Lecturer , LIECA LPU

Definition Application areas Steps to create a decision table Exercise Solution to exercise

Causes Cause 1 Cause 2 Cause 3 Effects Effect 1 Effect 2

Combinations Values 1 2 3 4 5 6 7 8 Y, N Y Y Y Y NNNN Y, N Y Y NNY Y NN Y, N Y NY NY NY N X X X X X X

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

Cause = condition Effect = action = expected results


3

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

Business Analysis Programming Testing Hardware Design etc

1.
2. 3. 4. 5. 6.

List all causes in the decision table Calculate the number of possible combinations Fill columns with all possible combinations Reduce test combinations Check covered combinations Add effects to the table
6

Causes Cause 1 Cause 2 Cause 3 Effects Effect 1 Effect 2

Values Y, N Y, N Y, N

Hints: Combinations 1 2 3 4 5 6 7 8Write down the values Y Y Y Y N N N Nthe cause/condition Y Y NNY Y NN Y N Y N Y N Y Ncan assume Cluster related causes X X X XPut the most X X dominating cause first Put multi valued causes last

Number of Values to If all causes are simply Y/N the power of the values: number of causes 2number of causes with these values

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

es e1 e2 e3 ts t1 t2

Combinations Values 1 2 3 4 5 6 7 8 Y, N Y Y Y Y NNNN Y, N Y Y NNY Y NN Y, N Y NY NY NY N X X X X X X

Algorithm: 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.
1.

Causes Cause 1 Cause 2 Cause 3 Effects Effect 1 Effect 2

Combinations Values 1 2 3 4 5 6 7 8 Y, N Y Y Y Y NNNN Y, N Y Y NNY Y NN Y, N Y N - - Y NY N X X X X X X

Find indifferent combinations place a -

Causes Cause 1 Cause 2 Cause 3 Effects Effect 1 Effect 2

Combinations Values 1 2 3 4 5 6 7 Y, N Y Y Y NNNN Y, N Y Y NY Y NN Y, N Y N - Y NY N X X X X X

Join columns where

columns are identical Tip: ensure the effects are the same
10

Causes Cause 1 Cause 2 Cause 3 Effects Effect 1 Effect 2 Checksum

Combinations Values 1 2 3 4 Y, N Y Y Y N Y, N Y N N Y, N - Y N X 2 1 X 1 4 8

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 Cause 1 Cause 2 Cause 3 Effects Effect 1 Effect 2 Checksum

Combinations Values 1 2 3 4 Y, N Y Y Y N Y, N Y N N Y, N - Y N X X 2 X X 1 1 4

Read column by column and determine the effects One effect can occur in multiple test 8 combinations

12

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

Das könnte Ihnen auch gefallen