Equivalence Class Partitioning is a black box testing method that divides the input domain of a program into classes of data from which test cases can be derived. It defines a test case that uncovers classes of errors and therefore the total number of gets reduced.there should be minimum two classes, one is for position cases and another is for negative cases.
Equivalence Class Partitioning (ECP) is mostly used where Tester needs to run the test cases for several sets of data-sets.
Advantages of Equivalence Class Partitioning:
- ECP number of test cases is reduced
- Classes helps tester to focus on smaller data-sets by which probability to uncover the defects are more.
- It eliminates the exhaustive testing for entire input domain which is not feasible.
- Allows covering of large domain of inputs
Limitations of Equivalence Class Partitioning:
- ECP usually does not consider the boundary conditions.
- Sometimes issues at boundaries are ignored.
- Testers tend to assume that result will be correct for all input data-set.
Following guidelines are used to define Equivalence class partitioning
- For Specified range of input condition, select one valid equivalence class that will cover valid range and second will contain invalid range.
- For Specific Value as input, select one valid equivalence class which will have that value and other will have other values than valid one.
- For Specific condition, select the set of valid input values then select the one valid equivalence class that contains valid set values and other should contains values other that the valid set values.
- if the input conditions are broken the select one valid and one invalid values.
Equivalence Class Partitioning plays important role for huge number of data-sets