Back to stories
<QA/>

Test Design: Equivalence Partitioning and Boundary Value

Share by

Test Design: Equivalence Partitioning and Boundary Value

Equivalence partitioning and boundary value analysis help you design test cases systematically: group inputs into classes and focus on boundaries where bugs often hide. This post explains both techniques with simple examples.


Equivalence partitioning

Idea: Inputs that behave the same way belong to one equivalence class. Test one representative from each class instead of every possible value.

Example: A field accepts ages 1–120. Classes: valid (1–120), invalid low (< 1), invalid high (> 120). Pick one value per class (e.g. 50, 0, 121) instead of testing 1, 2, 3, … 120.


Boundary value analysis

Idea: Bugs often appear at boundaries (min, max, just below, just above). Test values at and around boundaries.

Example: Ages 1–120. Test: 0, 1, 2 (around min); 119, 120, 121 (around max). You cover both sides of each boundary.


Combining both

  • Use equivalence partitioning to identify classes.
  • Use boundary value analysis to choose test values at and around boundaries of each class.
  • Result: fewer test cases, better coverage of critical boundaries.

Summary

  • Equivalence partitioning = group inputs into classes; test one representative per class.
  • Boundary value analysis = test at and around min/max and other boundaries.
  • Use both together for systematic, efficient test design.