You are here

Equivalence Partitioning (EQP or EP)

Equivalence partitioning (EP) is a blackbox test design technique. It is very common and mostly used by all the testers informally or even unknown.
Equivalence partitions are also known as equivalence classes.

This techniques is about dividing (partitioning) a parameter of test data into a set of test conditions or into sets or groups that can be considered same by the software system.
If one condition works fine then all the conditions within that partition will work the same way. If one condition fails in that partition then all other conditions will fail in that partition.

These conditions may not always be true however testers can use better partitions and also test some more conditions within those partitions to confirm that the selection of that partition is fine.

Examples:

A store in Germany offers different discounts depending on the purchases made by the customers. In order to test the software that calculates the discounts, we can identify the ranges of purchase values that earn the different discounts.
For example, if a purchase is in the range of €1 up to €50 has no discounts, a purchase over €50 and up to €200 has a 5% discount, and purchases of €201 and up to €500 have a 10% discounts, and purchases of €501 and above have a 15% discounts.

Now we can identify 4 valid equivalence partitions and 1 invalid partition as shown below.

Invalid Partition Valid Partition(No Discounts) Valid Partition(5%) Valid Partition(10%) Valid Partition(15%)
€0.01 €1-€50 €51-€200 €201-€500 €501-Above