4.Lect-4 Decision Table Training Session

download 4.Lect-4 Decision Table Training Session

of 16

Transcript of 4.Lect-4 Decision Table Training Session

  • 8/2/2019 4.Lect-4 Decision Table Training Session

    1/16

    A useful testing technique and more

    Mohit Arora

    Lecturer , LIECA

    LPU

  • 8/2/2019 4.Lect-4 Decision Table Training Session

    2/16

    Definition Application areas Steps to create a

    decision table Exercise Solution to exercise

    2

  • 8/2/2019 4.Lect-4 Decision Table Training Session

    3/16

    Decision tables are used to layout in tabular form allpossible situations which a

    business decision mayencounter.

    A decision table lists causesand effects in a matrix.Each column represents a

    unique combination. Purpose is to structure logic

    3

    Cause = condition

    Effect = action = expected results

    Causes Values 1 2 3 4 5 6 7 8

    Cause 1 Y, N Y Y Y Y N N N N

    Cause 2 Y, N Y Y N N Y Y N NCause 3 Y, N Y N Y N Y N Y N

    Effects

    Effect 1 X X X

    Effect 2 X X X

    Combinations

  • 8/2/2019 4.Lect-4 Decision Table Training Session

    4/16

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

    4

  • 8/2/2019 4.Lect-4 Decision Table Training Session

    5/16

  • 8/2/2019 4.Lect-4 Decision Table Training Session

    6/16

    1. List all causes in the decisiontable

    2. Calculate the number of possiblecombinations

    3. Fill columns with all possiblecombinations

    4. Reduce test combinations5. Check covered combinations6. Add effects to the table

    6

  • 8/2/2019 4.Lect-4 Decision Table Training Session

    7/16

    Hints: Write down the values

    the cause/conditioncan assume Cluster related causes Put the most

    dominating cause first Put multi valued

    causes last

    7

    Causes Values 1 2 3

    Cause 1 Y, N Y Y Y

    Cause 2 Y, N Y Y N

    Cause 3 Y, N Y N Y

    Effects

    Effect 1 X

    Effect 2 X

    Com

  • 8/2/2019 4.Lect-4 Decision Table Training Session

    8/16

    If all causes are simply Y/Nvalues:

    2number of causes

    If 1 cause with 3 values and 3with 2:31 * 23 = 24

    Or, use the Values columnand multiply each valuedown the column, eg.3*2*2*2=24

    8

    Number of Values to

    the power of the

    number of causes

    with these values

  • 8/2/2019 4.Lect-4 Decision Table Training Session

    9/16

    Algorithm:

    1. Determine Repeating Factor (RF):

    divide remaining combinations by thenumber of possible values for thatcause

    2. Write RF times the first value, then

    RF times the next etc. until row is full3. Next row, go to 1.

    9

    s Values 1 2 3 4 5 6 7 8

    1 Y, N Y Y Y Y N N N N

    2 Y, N Y Y N N Y Y N N

    3 Y, N Y N Y N Y N Y Ns

    1 X X X

    2 X X X

    Combinations

  • 8/2/2019 4.Lect-4 Decision Table Training Session

    10/16

    Find indifferentcombinations placea -

    10

    Causes Values 1 2 3 4 5 6 7 8

    Cause 1 Y, N Y Y Y Y N N N N

    Cause 2 Y, N Y Y N N Y Y N N

    Cause 3 Y, N Y N - - Y N Y NEffects

    Effect 1 X X X

    Effect 2 X X X

    Combinations

    Causes Values 1 2 3 4 5 6 7

    Cause 1 Y, N Y Y Y N N N N

    Cause 2 Y, N Y Y N Y Y N N

    Cause 3 Y, N Y N - Y N Y N

    Effects

    Effect 1 X X

    Effect 2 X X X

    Combinations

    Join columns wherecolumns are identical

    Tip: ensure the effectsare the same

  • 8/2/2019 4.Lect-4 Decision Table Training Session

    11/16

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

    11

    Causes Values 1 2 3 4

    Cause 1 Y, N Y Y Y N

    Cause 2 Y, N Y N N -

    Cause 3 Y, N - Y N -

    Effects

    Effect 1 X X

    Effect 2

    Checksum 2 1 1 4 8

    Combinations

  • 8/2/2019 4.Lect-4 Decision Table Training Session

    12/16

    Read column bycolumn and

    determine theeffects

    One effect can occurin multiple test

    combinations

    12

    Causes Values 1 2 3 4

    Cause 1 Y, N Y Y Y N

    Cause 2 Y, N Y N N -

    Cause 3 Y, N - Y N -

    Effects

    Effect 1 X X

    Effect 2 X X

    Checksum 2 1 1 4 8

    Combinations

  • 8/2/2019 4.Lect-4 Decision Table Training Session

    13/16

    A marketing company wishes to construct a decisiontable to decide how to treat clients according to threecharacteristics: Gender, City Dweller, and age group:

    A (under 30), B (between 30 and 60), C (over 60). Thecompany has four products (W, X, Y and Z) to testmarket. 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 livein cities. Product Z will appeal to all but older females.

    13

  • 8/2/2019 4.Lect-4 Decision Table Training Session

    14/16

    --Identify Conditions & ValuesThe three data attributes tested by the

    conditions in this problem are1. gender, with values M and F;2. city dweller, with value Y and N; and3. age group, with values A, B, and C as stated

    in the problem.

    14

  • 8/2/2019 4.Lect-4 Decision Table Training Session

    15/16

    2. Compute Maximum Number of Rules Themaximum number of rules is 2 x 2 x 3 = 12

    3. Identify Possible Actions The four actions are:market product W, market product X, marketproduct Y, market product Z.

    4. Enter All Possible Rules The top of the tablewould look as follows: Note that allcombinations of values are present.

    15

  • 8/2/2019 4.Lect-4 Decision Table Training Session

    16/16

    16