← Back to libraryQuestion 309 of 468
📝Manual / FunctionalIntermediate

Equivalence Partitioning

📌 Definition:

Equivalence Partitioning is a black-box test-design technique that divides input data into partitions (classes) expected to be treated the same, so testing one representative value per partition gives good coverage with fewer tests.

📖 Detailed Explanation:

If inputs in a range/set are handled identically, you don't need to test every value — pick one representative from each VALID and each INVALID partition. For an age field accepting 18–60: valid partition (18–60), invalid-low (<18), invalid-high (>60), and non-numeric — test one value from each (e.g. 30, 10, 70, 'abc'). This drastically reduces test count while maintaining coverage of behavior classes. It's usually combined with Boundary Value Analysis (which tests the edges). Equivalence Partitioning is a foundational technique interviewers expect you to apply.

🔑 Key Points:
  • Divide inputs into classes treated identically; test one per class
  • Cover both VALID and INVALID partitions
  • Cuts test count while keeping behavioral coverage
  • Combine with Boundary Value Analysis for edges
🌍 Real-World Example:

An age field (18–60): partitions are valid 18–60, invalid <18, invalid >60, and non-numeric — testing 30, 10, 70, and 'ab' covers all classes with four tests instead of dozens.

🎯 Scenario-Based Interview Question:

A field accepts amounts from 100 to 5000. Using equivalence partitioning, what values would you test?