Equivalence classes

Approach Coverage based - Data
Test variety Primarily functionality, also applicable in other test varieties
Test Basis Almost all kinds

The covering of equivalence classes is a powerful means of achieving a relatively high fault-detection rate with a limited set of test situations. The principle is simple and is applied by most experienced testers automatically and intuitively.


Definition: In the application of equivalence classes, the entire value range of a parameter is partitioned into classes, in which the system behaviour is similar (equivalent).
 
These are called equivalence classes. Other terms used to refer to the design of test cases based on equivalence classes are “equivalence partitioning” and “domain testing”.
 
The principle behind the application of equivalence classes is that each value taken from a class has the same chance of finding a fault and that testing with several values from the same class barely increases the chances of fault detection. It should be realised that this is an assumption. If, with a random value in an equivalence class the correct system behaviour occurs, it is in principle still possible for a fault to occur with another value.
 
Even though the underlying principle is an assumption, it is a usable and useful one. By basing test cases on these equivalence classes instead of on every possible input value, the number of test cases is restricted, while a satisfactory coverage is obtained of the possible variations in the system behaviour.
 
See the following animation for a more detailed explanation: