Confidential | Copyright © Agile Testing Alliance
Equivalence Partition and Boundary
Value technique – Multi Variable
Surest way to learn Practical Agile Testing
Confidential | Copyright © Agile Testing Alliance
About Adi
#adigindia
in.linkedin.com/in/adigarg/
Confidential | Copyright © Agile Testing Alliance
Aditya Garg
 BE CSE, Jodhpur Univ; MBA Finance, UMASS Lowell, MA,
USA.
 Certified Trainer Agile Testing,Qualified Project Management
Professional (QPMP), Six Sigma Black Belt, ISTQB certified
foundation and advanced level Tester, Sun Certified Java
Programmer, Presenter in International conferences on Project
Management, Quality and Testing
 18+ years of IT Industry experience with:
 Larsen & Toubro Infotech Ltd, India
 NSE.IT (National Stock Exchange, India)
 Celox Networks, USA
 Netscout Systems, USA
Aditya has been a test architect and principal consultant excelling in designing, strategizing and architecting manual and automation testing
solutions. His primary focus has been in the area of establishing and leading testing center of excellence and practices, managing large IT
projects, undertaking testing process studies using Six Sigma, CMMi and TMM models, proposing QA solutions, performance engineering
and architecture reviews, designing automation frameworks, exploring open source test automation tools/frameworks and Business
development
Aditya has not only managed to establish the entire testing services grounds up but has been a chief innovator in testing processes , test
automation and performance testing areas. Aditya has set up offshore testing service centers for large clients from sizes ranging from 10 to
100 people.
Confidential | Copyright © Agile Testing Alliance
Equivalence Partition
Confidential | Copyright © Agile Testing Alliance
Equivalence Partitioning
• Input domain is usually too large for exhaustive testing.
• Partition input domain into a finite number of sub-domains
for the selection of test inputs.
• Each sub-domain is known as an equivalence class and
serves as a source of at least one test input.
Input domain
1
2
3
4
Input domain
partitioned into four
sub-domains.
Too many
test inputs.
Four test inputs, one
selected from each sub-
domain.
Confidential | Copyright © Agile Testing Alliance
Equivalence partitioning (EP)
– divide (partition) the inputs, outputs, etc. into
areas which are the same (equivalent)
– assumption: if one value works, all will work
– one from each partition better than all from
one
1 100 1010
valid invalidinvalid
Confidential | Copyright © Agile Testing Alliance
Boundary Value
Confidential | Copyright © Agile Testing Alliance
Boundary value analysis (BVA)
– faults tend to lurk near boundaries
– good place to look for faults
– test values on both sides of boundaries
1 100 1010
valid invalidinvalid
Confidential | Copyright © Agile Testing Alliance
- Analyzing the specification
- A loan application software forwards the application to the relevant
Approver, once the applicant enters the loan requested, income entered
and duration for the loan chosen.
EP – Exercise
Assumptions:
- Loan Amount requested is positive number with 2 decimal places
- Income Entered is a positive number with 2 decimal points
- Duration of the loan can be 1,3,5 and 7 years only
Find out the Equivalence classes and minimum
number of test cases required
Confidential | Copyright © Agile Testing Alliance
EP – Solution-1
Variable Equivalence
Class
Status Representative
LA-1: x > 0 valid 100000.00
LA-2: x <= 0 invalid -100000.00
LA-3: x is a special
Character
invalid *
LA-4 x is non-
numerical value
invalid ATA
In-1: x > 0 valid 200000.00
In-2: x <= 0 invalid -200000.00
In-3: x is a special
Character
invalid $
In-4 x is non-
numerical value
invalid AGILE
Du - 1: x = 1 valid 1
Du - 2: x = 3 valid 3
Du - 2: x = 5 valid 4
Du - 2: x = 7 valid 7
Du: x ¹ {1,3,5,7} invalid 4
Du: x non-
numerical value
invalid Testing
Loan Amount
Income
Duration
Confidential | Copyright © Agile Testing Alliance Page 11
Equivalence class – Rules in General
– Choosing representatives
• any value within the EC can be a representative.
• Representatives of valid EC may be combined
• Representatives of invalid EC may not be combined
• Representatives of invalid EC may only be combined with valid
representatives of other EC
Confidential | Copyright © Agile Testing Alliance
Variable Equivalen
ce Class
Statu
s
Representat
ive
TC1 TC2 TC3 TC4
LA-1: x > 0 valid 100000.00 √ √ √ √
LA-2: x <=
0
invali
d
-100000.00
LA-3: x is a
special
Character
invali
d
*
LA-4 x is
non-
numerical
value
invali
d
ATA
In-1: x > 0 valid 200000.00 √ √ √ √
In-2: x <= 0 invali
d
-200000.00
In-3: x is a
special
Character
invali
d
$
In-4 x is non-
numerical
value
invali
d
AGILE
Du - 1: x =
1
valid 1
√
Du - 2: x =
3
valid 3
√
Du - 2: x =
5
valid 4
√
Du - 2: x =
7
valid 7
√
Du: x ¹
{1,3,5,7}
invali
d
4
Du: x non-
numerical
value
invali
d
Testing
Loan Amount
Income
Duration
EP
Valid Test
Cases = 4
Confidential | Copyright © Agile Testing Alliance
EP
Variable Equivale
nce
Class
Statu
s
Represent
ative
TC5 TC6 TC7 TC8 TC9 TC10 TC11 TC12
LA-1: x >
0
valid 100000.00 √ √ √ √ √
LA-2: x <=
0
invali
d
-100000.00
√
LA-3: x is
a special
Character
invali
d
*
√
LA-4 x is
non-
numerical
value
invali
d
ATA
√
In-1: x > 0 valid 200000.00 √ √ √ √ √
In-2: x <=
0
invali
d
-200000.00
√
In-3: x is a
special
Character
invali
d
$
√
In-4 x is
non-
numerical
value
invali
d
AGILE
√
Du - 1: x =
1
valid 1
√ √ √ √ √ √
Du - 2: x =
3
valid 3
Du - 2: x =
5
valid 4
Du - 2: x =
7
valid 7
Du: x ¹
{1,3,5,7}
invali
d
4
√
Du: x non-
numerical
value
invali
d
Testing
√
Loan
Amount
Income
Duration
Invalid
Test Cases
= 8
Confidential | Copyright © Agile Testing Alliance
Variable Equivale
nce
Class
Statu
s
Represent
ative
TC1 TC2 TC3 TC4 TC5 TC6 TC7 TC8 TC9 TC10 TC11 TC12
LA-1: x >
0
valid 100000.00
√ √ √ √ √ √ √ √ √
LA-2: x <=
0
invali
d
-100000.00
√
LA-3: x is
a special
Character
invali
d
*
√
LA-4 x is
non-
numerical
value
invali
d
ATA
√
In-1: x > 0 valid 200000.00 √ √ √ √ √ √ √ √ √
In-2: x <=
0
invali
d
-200000.00
√
In-3: x is a
special
Character
invali
d
$
√
In-4 x is
non-
numerical
value
invali
d
AGILE
√
Du - 1: x =
1
valid 1
√ √ √ √ √ √ √
Du - 2: x =
3
valid 3
√
Du - 2: x =
5
valid 4
√
Du - 2: x =
7
valid 7
√
Du: x ¹
{1,3,5,7}
invali
d
4
√
Du: x non-
numerical
value
invali
d
Testing
√
Loan
Amount
Income
Duration
Total
Test
Cases 12

Agile Testing Alliance Chapter presentation - Equivalence Partition and Boundary Value for Multi Variable

  • 1.
    Confidential | Copyright© Agile Testing Alliance Equivalence Partition and Boundary Value technique – Multi Variable Surest way to learn Practical Agile Testing
  • 2.
    Confidential | Copyright© Agile Testing Alliance About Adi #adigindia in.linkedin.com/in/adigarg/
  • 3.
    Confidential | Copyright© Agile Testing Alliance Aditya Garg  BE CSE, Jodhpur Univ; MBA Finance, UMASS Lowell, MA, USA.  Certified Trainer Agile Testing,Qualified Project Management Professional (QPMP), Six Sigma Black Belt, ISTQB certified foundation and advanced level Tester, Sun Certified Java Programmer, Presenter in International conferences on Project Management, Quality and Testing  18+ years of IT Industry experience with:  Larsen & Toubro Infotech Ltd, India  NSE.IT (National Stock Exchange, India)  Celox Networks, USA  Netscout Systems, USA Aditya has been a test architect and principal consultant excelling in designing, strategizing and architecting manual and automation testing solutions. His primary focus has been in the area of establishing and leading testing center of excellence and practices, managing large IT projects, undertaking testing process studies using Six Sigma, CMMi and TMM models, proposing QA solutions, performance engineering and architecture reviews, designing automation frameworks, exploring open source test automation tools/frameworks and Business development Aditya has not only managed to establish the entire testing services grounds up but has been a chief innovator in testing processes , test automation and performance testing areas. Aditya has set up offshore testing service centers for large clients from sizes ranging from 10 to 100 people.
  • 4.
    Confidential | Copyright© Agile Testing Alliance Equivalence Partition
  • 5.
    Confidential | Copyright© Agile Testing Alliance Equivalence Partitioning • Input domain is usually too large for exhaustive testing. • Partition input domain into a finite number of sub-domains for the selection of test inputs. • Each sub-domain is known as an equivalence class and serves as a source of at least one test input. Input domain 1 2 3 4 Input domain partitioned into four sub-domains. Too many test inputs. Four test inputs, one selected from each sub- domain.
  • 6.
    Confidential | Copyright© Agile Testing Alliance Equivalence partitioning (EP) – divide (partition) the inputs, outputs, etc. into areas which are the same (equivalent) – assumption: if one value works, all will work – one from each partition better than all from one 1 100 1010 valid invalidinvalid
  • 7.
    Confidential | Copyright© Agile Testing Alliance Boundary Value
  • 8.
    Confidential | Copyright© Agile Testing Alliance Boundary value analysis (BVA) – faults tend to lurk near boundaries – good place to look for faults – test values on both sides of boundaries 1 100 1010 valid invalidinvalid
  • 9.
    Confidential | Copyright© Agile Testing Alliance - Analyzing the specification - A loan application software forwards the application to the relevant Approver, once the applicant enters the loan requested, income entered and duration for the loan chosen. EP – Exercise Assumptions: - Loan Amount requested is positive number with 2 decimal places - Income Entered is a positive number with 2 decimal points - Duration of the loan can be 1,3,5 and 7 years only Find out the Equivalence classes and minimum number of test cases required
  • 10.
    Confidential | Copyright© Agile Testing Alliance EP – Solution-1 Variable Equivalence Class Status Representative LA-1: x > 0 valid 100000.00 LA-2: x <= 0 invalid -100000.00 LA-3: x is a special Character invalid * LA-4 x is non- numerical value invalid ATA In-1: x > 0 valid 200000.00 In-2: x <= 0 invalid -200000.00 In-3: x is a special Character invalid $ In-4 x is non- numerical value invalid AGILE Du - 1: x = 1 valid 1 Du - 2: x = 3 valid 3 Du - 2: x = 5 valid 4 Du - 2: x = 7 valid 7 Du: x ¹ {1,3,5,7} invalid 4 Du: x non- numerical value invalid Testing Loan Amount Income Duration
  • 11.
    Confidential | Copyright© Agile Testing Alliance Page 11 Equivalence class – Rules in General – Choosing representatives • any value within the EC can be a representative. • Representatives of valid EC may be combined • Representatives of invalid EC may not be combined • Representatives of invalid EC may only be combined with valid representatives of other EC
  • 12.
    Confidential | Copyright© Agile Testing Alliance Variable Equivalen ce Class Statu s Representat ive TC1 TC2 TC3 TC4 LA-1: x > 0 valid 100000.00 √ √ √ √ LA-2: x <= 0 invali d -100000.00 LA-3: x is a special Character invali d * LA-4 x is non- numerical value invali d ATA In-1: x > 0 valid 200000.00 √ √ √ √ In-2: x <= 0 invali d -200000.00 In-3: x is a special Character invali d $ In-4 x is non- numerical value invali d AGILE Du - 1: x = 1 valid 1 √ Du - 2: x = 3 valid 3 √ Du - 2: x = 5 valid 4 √ Du - 2: x = 7 valid 7 √ Du: x ¹ {1,3,5,7} invali d 4 Du: x non- numerical value invali d Testing Loan Amount Income Duration EP Valid Test Cases = 4
  • 13.
    Confidential | Copyright© Agile Testing Alliance EP Variable Equivale nce Class Statu s Represent ative TC5 TC6 TC7 TC8 TC9 TC10 TC11 TC12 LA-1: x > 0 valid 100000.00 √ √ √ √ √ LA-2: x <= 0 invali d -100000.00 √ LA-3: x is a special Character invali d * √ LA-4 x is non- numerical value invali d ATA √ In-1: x > 0 valid 200000.00 √ √ √ √ √ In-2: x <= 0 invali d -200000.00 √ In-3: x is a special Character invali d $ √ In-4 x is non- numerical value invali d AGILE √ Du - 1: x = 1 valid 1 √ √ √ √ √ √ Du - 2: x = 3 valid 3 Du - 2: x = 5 valid 4 Du - 2: x = 7 valid 7 Du: x ¹ {1,3,5,7} invali d 4 √ Du: x non- numerical value invali d Testing √ Loan Amount Income Duration Invalid Test Cases = 8
  • 14.
    Confidential | Copyright© Agile Testing Alliance Variable Equivale nce Class Statu s Represent ative TC1 TC2 TC3 TC4 TC5 TC6 TC7 TC8 TC9 TC10 TC11 TC12 LA-1: x > 0 valid 100000.00 √ √ √ √ √ √ √ √ √ LA-2: x <= 0 invali d -100000.00 √ LA-3: x is a special Character invali d * √ LA-4 x is non- numerical value invali d ATA √ In-1: x > 0 valid 200000.00 √ √ √ √ √ √ √ √ √ In-2: x <= 0 invali d -200000.00 √ In-3: x is a special Character invali d $ √ In-4 x is non- numerical value invali d AGILE √ Du - 1: x = 1 valid 1 √ √ √ √ √ √ √ Du - 2: x = 3 valid 3 √ Du - 2: x = 5 valid 4 √ Du - 2: x = 7 valid 7 √ Du: x ¹ {1,3,5,7} invali d 4 √ Du: x non- numerical value invali d Testing √ Loan Amount Income Duration Total Test Cases 12