Equivalence Partitioning Testing
Equivalence Class Partitioning and Boundary Value Testing · Also known as: equivalence partitioning, BVA, boundary value analysis
Equivalence partitioning divides input domains into equivalence classes—sets of inputs expected to behave identically—then selects test cases from each class. Introduced by Myers (1979), this technique reduces test cases while maintaining effectiveness. Boundary value analysis (BVA) complements partitioning by testing values at partition boundaries where failures often occur.
Read the full method
Sign in with a free account to read this section.
Method map
The neighbourhood of related methods — select a node to explore.
When to use it
Apply equivalence partitioning when input domain is large or continuous (ranges of integers, floating-point numbers). Particularly effective for functions with clear input ranges: validation functions, mathematical functions, protocol parsers. Combine with boundary value analysis to catch off-by-one errors and edge cases. Less valuable for complex logical conditions; decision table analysis suits those better.
Strengths & limitations
- Dramatically reduces test case count while maintaining coverage; achieves near-boundary coverage with linear test cases
- Captures intuition that inputs in a class behave similarly; partitions align with software design intent
- Boundary value analysis catches common defect patterns (off-by-one, fence-post errors)
- Simple to understand and apply; teachable technique for software engineering teams
- Effectiveness depends on correct partition identification; wrong partitions miss bugs
- Assumes inputs are independent; combinatorial interactions between inputs may escape detection
- Does not detect all defect types: logic errors, state-dependent bugs, concurrency issues often hide in equivalent classes
- Boundary value selection can be arbitrary; guidelines help but subjective judgment remains
Frequently asked
How do I identify equivalence classes for complex inputs?
Start with domain specification: what values are valid, what ranges exist, what values are excluded? Group values where program behavior is expected to be identical. For numeric inputs, typical classes: negative numbers, zero, positive numbers, large values, values causing overflow. For strings: empty, normal length, max length, special characters, non-ASCII. Consult requirements to find intent-based partitions.
What is the difference between valid and invalid equivalence classes?
Valid equivalence classes contain inputs meeting system requirements; invalid classes contain inputs violating requirements. Test both: valid classes verify correct behavior; invalid classes verify error handling. Example: age input validation: valid class [0, 150], invalid classes [<0] and [>150]. Include test cases from both to validate acceptance and rejection logic.
How many test cases should I generate per equivalence class?
Minimum: one test case per equivalence class (achieves basic coverage). Effective: add boundary test cases (just inside/at/outside boundary). For critical systems, add additional tests within classes. Do not create too many; diminishing returns apply. A function with 5 equivalence classes × 3 test cases per class = 15 tests is typical; 50 tests suggests over-testing.
Can equivalence partitioning guarantee I will catch all bugs?
No. Equivalence partitioning catches bugs in input validation and range-checking excellently. It misses logic errors, state-dependent bugs, and concurrency issues. Combine with other techniques: boundary value analysis (covered here), decision table analysis (for complex logic), state-based testing (for stateful systems), exploratory testing (creative scenarios).
Sources
- Myers, G. J. (1979). The Art of Software Testing. John Wiley & Sons. link ↗
- Beizer, B. (1990). Software Testing Techniques (2nd ed.). International Thomson Computer Press. link ↗
- Coppit, D., & Leavens, G. T. (2003). Practical implications of simpler, more scalable path-sensitive data flow analyses. ACM Transactions on Software Engineering and Methodology, 12(3), 261–306. link ↗
How to cite this page
ScholarGate. (2026, June 3). Equivalence Class Partitioning and Boundary Value Testing. ScholarGate. https://scholargate.app/en/software-engineering/software-testing-equivalence
Which method?
Set this method beside its closest kin and read them side by side — the library lays the books on the table; the choice is yours.
- Code Coverage AnalysisSoftware Engineering↔ compare
- Defect Prediction ModelSoftware Engineering↔ compare
- Software Complexity MetricsSoftware Engineering↔ compare
- Static Code AnalysisSoftware Engineering↔ compare