Equivalence Class Partitioning is a black-box testing technique which assists testers in planning and prioritizing the test cases by dividing the input data into sets of equivalent values or classes. This is especially helpful in order to enhance the test coverage without having to invest a lot of effort to test a large number of inputs.
In equivalence class partitioning, input data is partitioned into classes which are expected to be processed in the same manner by the system. For instance, if an input field is to accept values from 1 to 100, one class of equivalents may contain all the values that fall within this range while the other class may contain all the values that are not within this range. The concept is that one can test just one value for every class and it will be enough to determine the outcome for the whole class instead of testing all the values possible.
For instance, let us assume that there is a software application that asks a user to enter his or her age which must be a number between 18 and 65. The equivalence classes might be:
When testing these representative values the tester will be able to confirm that the system works as expected for the entire set of valid and invalid inputs with out having to test for every single value.
Equivalence class partitioning offers several key benefits:
Equivalence Class Partitioning is one of the black box testing techniques that can be used to maximize the testing efficiency by dividing the input data into classes which are expected to produce similar results. This approach greatly minimises the number of test cases that are required in testing while at the same time ensuring that good coverage is achieved. When testers think that if one value in a class is good all others will also work then they can concentrate on finding out the critical input ranges which has to be tested and validated and thus testing becomes more efficient and efficient.