It's a technique of grouping and partitioning the test input data, which is being used for the purpose of testing the software product into a number of different classes. These different classes, resembles the specified requirements and common behaviour or attribute(s) of the aggregated inputs.
Thereafter, the test cases are designed and created based on each class attribute(s) and one element or input is used from each class for the test execution to validate the software functioning, and simultaneously validates the similar working of the software product for all the other inputs present in their respective classes.
If you haven't understood the working of the equivalence class testing, then let's go through an example to clear the concept.
Consider a software application, which takes not less than two digit number and not more than 3 digit number, for its execution.Below given is the huge amount of input, to test and validate the functioning of the software application.
Now, as per the requirement specifications, we now group these inputs, to form some classes.
Now, instead of testing the whole 1500 inputs, we have form 4 classes, and accordingly divided them in the category of valid inputs and invalid inputs. This reduces the work of the test case preparation, as we may have to prepare only 4 test cases for 4 different classes.
A single element, chosen from each class, as a test input, represents the whole class. For an example, a number 121 is used from the class "three digit numbers" as the test input. On using 121, it was found that software application functions properly and passes the test. Therefore, it is assumed that all the other numbers of the class "three digit number" will works wells for the software application. And if the software fails the test, then it is assumed, that all the three digit numbers will generate error in the software application.
Similarly, a number 7 is used from the class "single digit numbers", i.e. invalid input. It is expected by the software application, to generate error, on using number 7, and if does then the software is functioning appropriately, and it is also assumed that the remaining single digit number will also produces error(s), in the software application.