Equivalence Partitioning Generator
Derive valid and invalid equivalence classes with a representative each.
For a range or length, give min, max. For a set, give the accepted values, comma-separated.
This tool needs JavaScript enabled to run in your browser.
What this tool does
This tool divides each input into equivalence classes: groups of values the system should treat the same way. For every class it picks one representative value and marks it valid or invalid, so you can cover a whole input with a small, defensible set of tests.
The idea behind it
If an age field accepts 18 to 65, you do not need to test every number. The values below 18, the values from 18 to 65, and the values above 65 each form a class where one value stands in for the rest. Testing one from each class gives good coverage for a handful of cases. The technique assumes the system really does treat a class uniformly, so split a class further whenever different values inside it trigger different behaviour.
The three input types
- Range: a numeric range gives a valid class inside it and invalid classes below and above.
- Set: a list of accepted values gives one valid class per value, plus one invalid class for anything not listed.
- Length: a string-length range gives a valid class and invalid classes for too short and too long, including empty input.
Equivalence partitioning and boundary values
The two techniques pair up. Equivalence partitioning picks a value from the middle of each class; boundary value analysis adds the values right at the edges, where off-by-one defects hide. Use this tool for the classes and the Boundary Value Analysis tool for the edges, and you have a strong set of cases for any ranged input.
Frequently asked questions
- How is this different from boundary value analysis?
- Equivalence partitioning picks a value from the middle of each class; boundary value analysis adds the values at the edges. They pair up, so use both for ranged inputs.
- What inputs does it support?
- Numeric ranges, sets of accepted values, and string-length constraints. Each produces valid and invalid classes with a representative value.
Learning resources
Testsmith also runs hands-on courses and a free practice app for the skills behind this tool.