Equivalence Partitioning — The Core
Imagine you're testing a field that accepts a person's age. The valid range is 0–120. How many test cases do you need?
If your answer is "a lot," you're not alone — but you're also not efficient. The honest answer is: as few as three classes, one valid and two invalid.
This is Equivalence Partitioning: the art of reducing an infinite problem to a manageable set.
Why This Module Matters
Every application has inputs. Every input has a range of acceptable values — and a much larger range of unacceptable ones. Without a system for organizing these, you'll either:
- Test too little (miss bugs) or
- Test too much (waste time testing the same behavior 50 different ways)
Equivalence Partitioning gives you a formal system to avoid both traps.
What You'll Learn
- The concept of equivalence classes and what makes values "equivalent" for testing purposes
- How to identify valid and invalid partitions for any input
- How to select minimal, representative input values that give maximum coverage
Your Practice Challenge
After the lessons, you'll work with the Minimal Calculator — a two-field form that adds two numbers. Your mission: define the equivalence classes (positive numbers, negative numbers, letters, empty) and verify the application handles each partition correctly.
It sounds simple. The bugs are not.