Skip to main content

Equivalence Partitioning

Equivalence Partitioning is a black-box testing technique that divides a set of test data into partitions or "classes" where all members are expected to produce the same outcome. Instead of testing every possible value, a tester selects one representative value from each partition, drastically reducing the number of test cases while maintaining effective coverage.

Example: For a program that calculates discounts based on a user's age, a valid age range might be 18 to 65. Using Equivalence Partitioning, a tester would create three distinct partitions:

  • Partition 1 (Invalid): Ages below 18 (e.g., 15)
  • Partition 2 (Valid): Ages from 18 to 65 (e.g., 30)
  • Partition 3 (Invalid): Ages above 65 (e.g., 70)

By testing just one value from each partition, the tester can efficiently verify the program's logic for all possible age inputs.