Professional Documents
Culture Documents
07 EquivalenceClass
07 EquivalenceClass
Chapter 6
Boundary value problems
ECT–2
Boundary value problems – 2
ECT–3
Motivation for equivalence class testing
ECT–4
Motivation for equivalence class testing – 2
Avoid redundancy
Have fewer test cases
Complete testing
Remove gaps
ECT–5
Addressing the motivation
ECT–6
Addressing the motivation– 2
ECT–7
Assumptions
ECT–8
Assumptions – 2
ECT–9
Assumptions – 3
Completeness
The entire set is represented by the union of the sub-sets
Redundancy
The disjointness of the sets assures a form of non-
redundancy
ECT–10
Selecting test values
ECT–11
Selecting test values – 2
ECT–12
Variations
ECT–13
Variations – 2
ECT–14
Weak-Normal ECT
ECT–15
Weak-Normal ECT – 2
x2
e
x1
a b c d
ECT–16
Strong-Normal ECT
ECT–17
Strong-Normal ECT – 2
x2
e
x1
a b c d
ECT–18
Weak-Robust ECT
ECT–19
Weak-Robust ECT – 2
f
Figure 6.3 in
e the textbook
is incorrect
x1
a b c d
ECT–20
Strong-Robust ECT
ECT–21
Strong-Robust ECT – 2
x2
e
x1
a b c d
ECT–22
Limitations of ECT
ECT–23
Limitations of ECT – 2
ECT–24
Limitations of ECT – 3
ECT–25
Triangle Output Equivalence Classes
ECT–26
Triangle Output Equivalence Classes – 2
ECT–27
Triangle – Weak-Normal
Expected
Test Case a b c
Output
WN1 5 5 5 Equilateral
WN2 2 2 3 Isosceles
WN3 3 4 5 Scalene
Not a
WN4 4 1 2
Triangle
ECT–28
Triangle Strong-Normal
ECT–29
Triangle – Strong-Normal = Weak-Normal
Expected
Test Case a b c
Output
WN1 5 5 5 Equilateral
WN2 2 2 3 Isosceles
WN3 3 4 5 Scalene
Not a
WN4 4 1 2
Triangle
ECT–30
Triangle Weak-Robust
ECT–31
Triangle – Weak Robust Test Cases
Expected
Test Case a b c
Output
WR1 -1 5 5 a not in range
ECT–32
Triangle Strong-Robust
ECT–33
Triangle – Strong-Robust Test Cases
#strong-normal = #weak-normal = 4
Total = 30
Triangle – input equivalence classes
ECT–35
NextDate – naive equivalence classes
ECT–36
NextDate – improved equivalence classes
M1 = {month : 1 .. 12 | days(month) = 30 }
M2 = {month : 1 .. 12 | days(month) = 31 }
M3 = {month : {2} }
D1 = {day : 1 .. 28}
What is good and bad
D2 = {day : {29} } with using these
equivalence classes?
D3 = {day : {30} }
D4 = {day : {31} }
Y1 = {year : {2000} }
Y2 = {year : 1812 .. 2012 | leap_year (year) ∧ year ≠ 2000 }
Y3 = {year : 1812 .. 2012 | common_year (year) }
ECT–37
Weak Normal Test Cases
Expected
Test Case Month Day Year
Output
Invalid input
WN3 2 30 2002
date
Invalid input
WN4 6 31 1900
date
ECT–38
NextDate strong test cases
ECT–39
NextDate strong test cases – 2
ECT–40
Commission problem – input classes
ECT–41
Commission problem – output classes
ECT–42
Guidelines and observations
ECT–43
Guidelines and observations – 2
ECT–44