Boundary Value Analysis and Equivalence Class Partitioning
With Simple Example
Boundary value analysisand Equivalence Class Partitioning both are test case design
techniques in black box testing. In this article we are covering “What is Boundary value
analysis and equivalence partitioning & its simple examples”.
What is Equivalence Class Partitioning?
Equivalence partitioning is a Test Case Design Technique to divide the input data of software
into different equivalence data classes. Test cases are designed for equivalence data class.
The equivalence partitions are frequently derived from the requirements specification for
input data that influence the processing of the test object. A use of this method reduces the
time necessary for testing software using less and effective test cases.
Equivalence Partitioning = Equivalence Class Partitioning = ECP
It can be used at any level of software for testing and is preferably a good technique to use
first. In this technique, only one condition to be tested from each partition. Because we
assume that, all the conditions in one partition behave in the same manner by the software.
In a partition, if one condition works other will definitely work. Likewise we assume that, if
one of the condition does not work then none of the conditions in that partition will work.
Equivalence partitioning is a testing technique where input values set into classes for
testing.
Valid Input Class = Keeps all valid inputs.
Invalid Input Class = Keeps all Invalid inputs.
Example of Equivalence Class Partitioning?
A text field permits only numeric characters
Length must be 6-10 characters long
Partition according to the requirement should be like this:
While evaluating Equivalence partitioning, values in all partitions are equivalent that’s why
0-5 are equivalent, 6 – 10 are equivalent and 11- 14 are equivalent.
At the time of testing, test 4 and 12 as invalid values and 7 as valid one.
It is easy to test input ranges 6–10 but harder to test input ranges 2-600. Testing will be
easy in the case of lesser test cases but you should be very careful. Assuming, valid input is
7. That means, you belief that the developer coded the correct valid range (6-10).