Top Banner
A useful testing technique and more…
16

decision table training session

Jun 25, 2015

Download

Design

This will help you to learn about decision tables
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: decision table training session

A useful testing technique and more…

Page 2: decision table training session

Definition Application areas Steps to create a

decision table Exercise Solution to

exercise

2

Page 3: decision table training session

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

Page 4: decision table training session

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

Page 5: decision table training session

Business Analysis Programming Testing Hardware Design etc

5

Page 6: decision table training session

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

Page 7: decision table training session

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

Page 8: decision table training session

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

Page 9: decision table training session

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

Page 10: decision table training session

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

Page 11: decision table training session

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

Page 12: decision table training session

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

Page 13: decision table training session

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

Page 14: decision table training session

--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

Page 15: decision table training session

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

Page 16: decision table training session

16