Top Banner
Elementary Comparison Test
33
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: Storyboard elementary comparison_test

Elementary Comparison Test

Page 2: Storyboard elementary comparison_test

age < 18 years OR driving licence suspended

error message

age < 25 years AND years holding driving licence < 3

premium := 1500

premium := 800

car age < 2 OR (car age ≥ 5

AND damage in last 3 years 2500)

OR age ≥ 70

increase premium by 500

IF

THEN

ELSE

EINDIF

IF

THEN

ELSE

ENDIF

IF

THEN

EINDIF

Page 3: Storyboard elementary comparison_test

age < 18 years OR driving licence suspended

error message

age < 25 years AND years holding driving licence < 3

premium := 1500

premium := 800

car age < 2 OR (car age ≥ 5

AND damage in last 3 years 2500)

OR age ≥ 70

increase premium by 500

IF

THEN

ELSE

EINDIF

IF

THEN

ELSE

ENDIF

IF

THEN

EINDIF

Elementary comparison Test

Thorough coverage of the decision points

by applying a coverage type per decision

point

Page 4: Storyboard elementary comparison_test

age < 18 years OR driving licence suspended

error message

age < 25 years AND years holding driving licence < 3

premium := 1500

premium := 800

car age < 2 OR (car age ≥ 5

AND damage in last 3 years 2500)

OR age ≥ 70

increase premium by 500

IF

THEN

ELSE

EINDIF

IF

THEN

ELSE

ENDIF

IF

THEN

EINDIF

1- Identifying test situations

- Identify decision points (look for IF-parts)

Page 5: Storyboard elementary comparison_test

age < 18 years OR driving licence suspended

error message

age < 25 years AND years holding driving licence < 3

premium := 1500

premium := 800

car age < 2 OR (car age ≥ 5

AND damage in last 3 years 2500)

OR age ≥ 70

increase premium by 500

IF

THEN

ELSE

EINDIF

IF

THEN

ELSE

ENDIF

IF

THEN

EINDIF

This decision point and the next one are ‘nested’ in the

first decision point

Page 6: Storyboard elementary comparison_test

age < 18 years OR driving licence suspended

error message

age < 25 years AND years holding driving licence < 3

premium := 1500

premium := 800

car age < 2 OR (car age ≥ 5

AND damage in last 3 years 2500)

OR age ≥ 70

increase premium by 500

IF

THEN

ELSE

EINDIF

IF

THEN

ELSE

ENDIF

IF

THEN

EINDIF

1- Identifying test situations

- Identify decision points (look for IF-parts)

- Provide decision points with unique identification

D1

D2

D3

Page 7: Storyboard elementary comparison_test

D1 age < 18 years OR driving licence suspended

error message

IF

THEN

ELSE

1- Identifying test situations

- Identify decision points (look for IF-parts)

- Provide decision points with unique identification

- Apply coverage type (e.g. MCDC) per decision point

- Uniquely identify test situations

Page 8: Storyboard elementary comparison_test

D1A OR B

1error message

0(D2)

A: age < 18 1 0 (1-1) 0 0 (1-3)

B: driving licence suspended

0 1 (1-2) 0 0

D1 age < 18 years OR driving licence suspended

error message

IF

THEN

ELSE

Indicates the outcome (which may imply going to the next

decision point)

Page 9: Storyboard elementary comparison_test

D2A AND B

1Premium= 1500

0premium= 800

A: age< 18 1 1 (2-1) 0 1 (2-2)

B: years holding driving licence < 3

1 1 1 0 (2-3)

D1 age < 18 years OR driving licence suspended

error message

IF

THEN

ELSE

D2 age < 25 jaar AND years holding driving licence < 3

premium := 1.500

premium := 800

IF

THEN

ELSE

D1A OR B

1error message

0(D2)

A: age < 18 1 0 (1-1) 0 0 (1-3)

B: driving licence suspended

0 1 (1-2) 0 0

Page 10: Storyboard elementary comparison_test

D3A OR (B AND C) OR D

1premium + 500

0

A: car age < 2 1 0 1 0 (3-1) 0 0 1 0 (3-4)

B: car age ≥ 5 0 1 1 0 (3-2) 0 0 1 0

C: damage in last 3 years ≥ 2500

0 1 1 0 0 1 0 0 (3-5)

D: age ≥ 70 0 1 0 1 (3-3) 0 1 0 0

D3 car age < 2 OR (car age ≥ 5

AND damage in last 3 years 2500)

OR age ≥ 70

increase premium by 500

IF

THEN

Page 11: Storyboard elementary comparison_test

1- Identifying test situations

- Identify decision points (look for IF-parts)

- Provide decision points with unique identification

- Apply coverage type (e.g. MCDC) per decision point

- Uniquely identify test situations

- Detailed working out of the derived test situations

D1 age < 18 years OR driving licence suspended

error message

IF

THEN

ELSE

D1A OR B

1error message

0(D2)

A: age < 18 1 0 (1-1) 0 0 (1-3)

B: driving licence suspended

0 1 (1-2) 0 0

Page 12: Storyboard elementary comparison_test

D1 D1-1 D1-2 D1-3

Age < 18 ≥ 18 ≥ 18

Driving licence suspended N Y N

D1 age < 18 years OR driving licence suspended

error message

IF

THEN

ELSE

D1A OR B

1error message

0(D2)

A: age < 18 1 0 (1-1) 0 0 (1-3)

B: driving licence suspended

0 1 (1-2) 0 0

Page 13: Storyboard elementary comparison_test

B2 D2-1 D2-2 D2-3

Age < 25 ≥ 25 < 25

years holding driving licence

< 3 < 3 ≥ 3

B3 D3-1 D3-2 D3-3 D3-4 D3-5

Car age < 2 ≥ 2 ≥ 2 ≥ 2 ≥ 2

Car age < 5 ≥ 5 ≥ 5 < 5 ≥ 5

Damage in last 3 years ≥ 2500 ≥ 2500 < 2500 ≥ 2500 < 2500

Age < 70 < 70 ≥ 70 < 70 < 70

D1 D1-1 D1-2 D1-3

Age < 18 ≥ 18 ≥ 18

Driving licence suspended N Y N

Page 14: Storyboard elementary comparison_test

D1

D2

D3

End

1- Identifying test situations

- Identify decision points (look for IF-parts)

- Provide decision points with unique identification

- Apply coverage type (e.g. MCDC) per decision point

- Uniquely identify test situations

- Detailed working out of the derived test situations

- Graphic demonstration of test situations

A circle for each decision point plus a circle for ‘End”

Page 15: Storyboard elementary comparison_test

D1A OR B

1error message

0(D2)

A: age < 18 1 0 (1-1) 0 0 (1-3)

B: driving licence suspended

0 1 (1-2) 0 0

1-1 1-21-3

D1

D2

D3

End

Each test situation is drawn as a line, leading to its

destination

Page 16: Storyboard elementary comparison_test

1-1 1-21-3

D1

End

D2A AND B

1premium= 1500

0premium=800

A: age < 18 1 1 (2-1) 0 1 (2-2)

B: years holding driving licence

1 1 1 0 (2-3)

2-12-2 2-3

D2

D3

Page 17: Storyboard elementary comparison_test

3-1 3-5

3-2 3-3 3-4

D3A OR (B AND C) OR D

1Premium + 500

0

A: car age < 2 1 0 1 0 (3-1) 0 0 1 0 (3-4)

B: car age ≥ 5 0 1 1 0 (3-2) 0 0 1 0

C: Damage in last 3 years ≥ 2500

0 1 1 0 0 1 0 0 (3-5)

D: age ≥ 70 0 1 0 1 (3-3) 0 1 0 0

2-12-2 2-3

1-1 1-21-3

D1

D2

D3

End

Page 18: Storyboard elementary comparison_test

Estimate the minimum

number of test cases:

the maximum number of

parallel lines

3-1 3-5

3-2 3-3 3-4

2-12-2 2-3

1-1 1-21-3

D1

D2

D3

End

2- Creating logical test cases

- Determine mutually exclusive test situations

Page 19: Storyboard elementary comparison_test

D2 D2-1 D2-2 D2-3

Age < 25 ≥ 25 < 25

Years holding driving licence

< 3 < 3 ≥ 3

D3 D3-1 D3-2 D3-3 D3-4 D3-5

Car age < 2 ≥ 2 ≥ 2 ≥ 2 ≥ 2

Car age < 5 ≥ 5 ≥ 5 < 5 ≥ 5

Damage in last 3 years

≥ 2500

≥ 2500

< 2500

≥ 2500

< 2500

Age < 70 < 70 ≥ 70 < 70 < 70

D1 D1-1 D1-2 D1-3

Age < 18 ≥ 18 ≥ 18

Driving licence suspended

N Y N

3-1 3-5

3-2 3-3 3-4

2-12-2

2-3

1-1 1-21-3

D1

D2

D3

End

Excluding: 2-1 and 3-3

Page 20: Storyboard elementary comparison_test

D2 D2-1 D2-2 D2-3

Age < 25 ≥ 25 < 25

Years holding driving licence

< 3 < 3 ≥ 3

D3 D3-1 D3-2 D3-3 D3-4 D3-5

Car age < 2 ≥ 2 ≥ 2 ≥ 2 ≥ 2

Car age < 5 ≥ 5 ≥ 5 < 5 ≥ 5

Damage in last 3 years

≥ 2500

≥ 2500

< 2500

≥ 2500

< 2500

Age < 70 < 70 ≥ 70 < 70 < 70

D1 D1-1 D1-2 D1-3

Age < 18 ≥ 18 ≥ 18

Driving licence suspended

N Y N

3-1 3-5

3-2 3-3 3-4

2-12-2

2-3

1-1 1-21-3

D1

D2

D3

End

Excluding: 2-3 and 3-3

Page 21: Storyboard elementary comparison_test

D2 D2-1 D2-2 D2-3

Age < 25 ≥ 25 < 25

Years holding driving licence

< 3 < 3 ≥ 3

D3 D3-1 D3-2 D3-3 D3-4 D3-5

Car age < 2 ≥ 2 ≥ 2 ≥ 2 ≥ 2

Car age < 5 ≥ 5 ≥ 5 < 5 ≥ 5

Damage in last 3 years

≥ 2500

≥ 2500

< 2500

≥ 2500

< 2500

Age < 70 < 70 ≥ 70 < 70 < 70

D1 D1-1 D1-2 D1-3

Age < 18 ≥ 18 ≥ 18

Driving licence suspended

N Y N

3-1 3-5

3-2 3-3 3-4

2-12-2

2-3

1-1 1-21-3

D1

D2

D3

End

1-1 and 2-2 are not mutually excluding since 1-1 directly

goes to the end and does not pass 2-2

Page 22: Storyboard elementary comparison_test

Exclusions

D2-1 with D3-3

D2-3 with D3-3

3-1 3-5

3-2 3-3 3-4

2-12-2

2-3

1-1 1-21-3

B1

B2

B3

Eind

2- Creating logical test cases

- Determine mutually exclusive test situations

- Combine with the aid of a matrix

Test si-tuations Value

D1-1 1

D1-2 1

D1-3 0

D2-1 1

D2-2 0

D2-3 0

D3-1 1

D3-2 1

D3-3 1

D3-4 0

D3-5 0

The result of the test situation

Next

End

End

D2

D3

D3

D3

End

End

End

End

End

Page 23: Storyboard elementary comparison_test

Exclusions

D2-1 with D3-3

D2-3 with D3-3

3-1 3-5

3-2 3-3 3-4

2-12-2

2-3

1-1 1-21-3

B1

B2

B3

Eind

Test si-tuations Value

D1-1 1

D1-2 1

D1-3 0

D2-1 1

D2-2 0

D2-3 0

D3-1 1

D3-2 1

D3-3 1

D3-4 0

D3-5 0

Next

End

End

D2

D3

D3

D3

End

End

End

End

End

TC-1

TC-2

TC-3

TC-4

TC-5

TC-6

TC-7

X

X

Page 24: Storyboard elementary comparison_test

Exclusions

D2-1 with D3-3

D2-3 with D3-3

3-1 3-5

3-2 3-3 3-4

2-12-2

2-3

1-1 1-21-3

B1

B2

B3

Eind

Test si-tuations Value

D1-1 1

D1-2 1

D1-3 0

D2-1 1

D2-2 0

D2-3 0

D3-1 1

D3-2 1

D3-3 1

D3-4 0

D3-5 0

Next

End

End

D2

D3

D3

D3

End

End

End

End

End

TC-1

TC-2

TC-3

TC-4

TC-5

TC-6

TC-7

X

X

X

X

X

Page 25: Storyboard elementary comparison_test

Exclusions

D2-1 with D3-3

D2-3 with D3-3

3-1 3-5

3-2 3-3 3-4

2-12-2

2-3

1-1 1-21-3

B1

B2

B3

Eind

Test si-tuations Value

D1-1 1

D1-2 1

D1-3 0

D2-1 1

D2-2 0

D2-3 0

D3-1 1

D3-2 1

D3-3 1

D3-4 0

D3-5 0

Next

End

End

D2

D3

D3

D3

End

End

End

End

End

TC-1

TC-2

TC-3

TC-4

TC-5

TC-6

TC-7

X

X

X X

X

X

X

X

Page 26: Storyboard elementary comparison_test

Exclusions

D2-1 with D3-3

D2-3 with D3-3

3-1 3-5

3-2 3-3 3-4

2-12-2

2-3

1-1 1-21-3

B1

B2

B3

Eind

Test si-tuations Value

D1-1 1

D1-2 1

D1-3 0

D2-1 1

D2-2 0

D2-3 0

D3-1 1

D3-2 1

D3-3 1

D3-4 0

D3-5 0

Next

End

End

D2

D3

D3

D3

End

End

End

End

End

TC-1

TC-2

TC-3

TC-4

TC-5

TC-6

TC-7

X

X

X X X

X

X

X

X

X

X

Page 27: Storyboard elementary comparison_test

Exclusions

D2-1 with D3-3

D2-3 with D3-3

3-1 3-5

3-2 3-3 3-4

2-12-2

2-3

1-1 1-21-3

B1

B2

B3

Eind

Test si-tuations Value

D1-1 1

D1-2 1

D1-3 0

D2-1 1

D2-2 0

D2-3 0

D3-1 1

D3-2 1

D3-3 1

D3-4 0

D3-5 0

Next

End

End

D2

D3

D3

D3

End

End

End

End

End

TC-1

TC-2

TC-3

TC-4

TC-5

TC-6

TC-7

X

X

X X X X X

X

X X

X X

X

X

X

X

X

Page 28: Storyboard elementary comparison_test

Test si-tuations

TC-4

D1-1

D1-2

D1-3 X

D2-1 X

D2-2

D2-3

D3-1 X

D3-2

D3-3

D3-4

D3-5

2- Creating logical test cases

- Determine mutually exclusive test situations

- Combine with the aid of a matrix

- Elaborate if necessary

Page 29: Storyboard elementary comparison_test

D2 D2-1 D2-2 D2-3

Age < 25 ≥ 25 < 25

Years licence < 3 < 3 ≥ 3

D1 D1-1 D1-2 D1-3

Age < 18 ≥ 18 ≥ 18

Licence suspended N Y N

D3 D3-1 D3-2 D3-3 D3-4 D3-5

Car age < 2 ≥ 2 ≥ 2 ≥ 2 ≥ 2

Car age < 5 ≥ 5 ≥ 5 < 5 ≥ 5

Damage 3 yrs ≥ 2500 ≥ 2500 < 2500 ≥ 2500 < 2500

Age < 70 < 70 ≥ 70 < 70 < 70

Test si-tuations

TC-4

D1-1

D1-2

D1-3 X

D2-1 X

D2-2

D2-3

D3-1 X

D3-2

D3-3

D3-4

D3-5

Page 30: Storyboard elementary comparison_test

D2 D2-1 D2-2 D2-3

Age < 25 ≥ 25 < 25

Years licence < 3 < 3 ≥ 3

D1 D1-1 D1-2 D1-3

Age < 18 ≥ 18 ≥ 18

Licence suspended N Y N

D3 D3-1 D3-2 D3-3 D3-4 D3-5

Car age < 2 ≥ 2 ≥ 2 ≥ 2 ≥ 2

Car age < 5 ≥ 5 ≥ 5 < 5 ≥ 5

Damage 3 yrs ≥ 2500 ≥ 2500 < 2500 ≥ 2500 < 2500

Age < 70 < 70 ≥ 70 < 70 < 70

Test case TC-4

Test situations D1-3D2-1D3-1

Age

Licence suspended

Years licence

Car age

Damage 3 yrs

Result:

Error message

Premium

Test si-tuations

TC-4

D1-1

D1-2

D1-3 X

D2-1 X

D2-2

D2-3

D3-1 X

D3-2

D3-3

D3-4

D3-5

Page 31: Storyboard elementary comparison_test

Test case TC-4

Test situations D1-3D2-1D3-1

Age 18

Licence suspended

Years licence

Car age

Damage 3 yrs

Result:

Error message

Premium

Test si-tuations

TC-4

D1-1

D1-2

D1-3 X

D2-1 X

D2-2

D2-3

D3-1 X

D3-2

D3-3

D3-4

D3-5

D2 D2-1 D2-2 D2-3

Age < 25 ≥ 25 < 25

Years licence < 3 < 3 ≥ 3

D1 D1-1 D1-2 D1-3

Age < 18 ≥ 18 ≥ 18

Licence suspended N Y N

D3 D3-1 D3-2 D3-3 D3-4 D3-5

Car age < 2 ≥ 2 ≥ 2 ≥ 2 ≥ 2

Car age < 5 ≥ 5 ≥ 5 < 5 ≥ 5

Damage 3 yrs ≥ 2500 ≥ 2500 < 2500 ≥ 2500 < 2500

Age < 70 < 70 ≥ 70 < 70 < 70

Page 32: Storyboard elementary comparison_test

Test case TC-4

Test situations D1-3D2-1D3-1

Age 18

Licence suspended N

Years licence 2

Car age 1

Damage 3 yrs 2500

Result:

Error message

Premium

Test si-tuations

TC-4

D1-1

D1-2

D1-3 X

D2-1 X

D2-2

D2-3

D3-1 X

D3-2

D3-3

D3-4

D3-5

D2 D2-1 D2-2 D2-3

Age < 25 ≥ 25 < 25

Years licence < 3 < 3 ≥ 3

D1 D1-1 D1-2 D1-3

Age < 18 ≥ 18 ≥ 18

Licence suspended N Y N

D3 D3-1 D3-2 D3-3 D3-4 D3-5

Car age < 2 ≥ 2 ≥ 2 ≥ 2 ≥ 2

Car age < 5 ≥ 5 ≥ 5 < 5 ≥ 5

Damage 3 yrs ≥ 2500 ≥ 2500 < 2500 ≥ 2500 < 2500

Age < 70 < 70 ≥ 70 < 70 < 70

Page 33: Storyboard elementary comparison_test

Test case TC-4

Test situations D1-3D2-1D3-1

Age 18

Licence suspended N

Years licence 2

Car age 1

Damage 3 yrs 2500

Result:

Error message -

Premium 2000

Test si-tuations

TC-4

D1-1

D1-2

D1-3 X

D2-1 X

D2-2

D2-3

D3-1 X

D3-2

D3-3

D3-4

D3-5

D2 D2-1 D2-2 D2-3

Age < 25 ≥ 25 < 25

Years licence < 3 < 3 ≥ 3

D1 D1-1 D1-2 D1-3

Age < 18 ≥ 18 ≥ 18

Licence suspended N Y N

D3 D3-1 D3-2 D3-3 D3-4 D3-5

Car age < 2 ≥ 2 ≥ 2 ≥ 2 ≥ 2

Car age < 5 ≥ 5 ≥ 5 < 5 ≥ 5

Damage 3 yrs ≥ 2500 ≥ 2500 < 2500 ≥ 2500 < 2500

Age < 70 < 70 ≥ 70 < 70 < 70