Elementary Comparison Test
Jul 20, 2015
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
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
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)
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
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
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
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)
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
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
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
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
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
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”
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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