Equivalence Class Partitioning Definition

Equivalence Class Partitioning

Equivalence class partitioning is a software testing methodology developed by Michael Myers, which is based on the principle of dividing input data into classes that are equivalent in terms of the expected behavior of the program. This method allows you to reduce the number of test cases without losing the appropriate test coverage.

The principle of equivalence class partitioning is to group the input data into classes, so that each class represents a group of data for which the behavior of the program is relatively the same. It is assumed that if a program works correctly for one member of a class, it will also work correctly for all the other members of that class.

Example of equivalence class partitioning

Consider a system that validates a user’s age with an acceptable range from 18 to 30:

  • Valid age class: values between 18 and 30
  • Invalid age class: values below 18 or above 30
  • Boundary or special case: age equal to 0

Testing one value from each class provides confidence in the system’s behavior while keeping the test suite lean and manageable.