Practical QA guide · 11 min
Equivalence Partitioning with Examples
Learn how to divide an input or output domain into useful partitions and select representative software test cases without unnecessary duplication.
Written and reviewed by ShiftQA Labs QA Education Team · Updated September 2, 2026
Browse Lessons modules
A partition represents shared expected behavior
Suppose an age field accepts whole numbers from 18 through 65. Values below 18 form one invalid partition, values from 18 through 65 form a valid partition, and values above 65 form another invalid partition. If decimals, text, blanks, or null values are handled differently, they belong to additional partitions.
Partitions come from rules, interfaces, data types, outputs, states, and business meaning. Do not group values merely because they look similar; group them because the product is expected to process them equivalently.
Choose representatives deliberately
One representative can cover a partition when all members truly share expected behavior. Select a value that clearly belongs to the group and record which partition it covers. Boundary value analysis can then add focused coverage at the edges.
When several inputs interact, testing one representative from each input independently may miss combinations. Use decision tables, pairwise selection, or risk-based combinations when the behavior depends on multiple conditions.
Watch for hidden partitions
Interfaces often contain hidden distinctions: leading spaces, Unicode characters, case sensitivity, localization, missing fields, stale identifiers, or different user roles. These deserve separate partitions only when expectations differ.
A good partition model is reviewable. Another person should be able to see the domain, the rule behind each group, the representative, and any excluded condition.
Worked example
Shipping quantity from 1 to 10
A cart accepts a whole-number quantity between 1 and 10 inclusive.
- 1Valid whole-number partition: 1–10. Representative: 5.
- 2Invalid whole numbers below range: 0 and below. Representative: 0.
- 3Invalid whole numbers above range: 11 and above. Representative: 11.
- 4Invalid non-integer numeric values: for example 2.5.
- 5Invalid non-numeric input: for example “two”.
- 6Missing input may be a separate partition if blank has its own validation rule.
- 7After partition coverage, apply boundary analysis around 1 and 10.
Frequently asked questions
Questions testers ask
How many values should be tested from each partition?
At least one representative is required for basic partition coverage. Risk, defect history, and uncertainty may justify more than one.
Is equivalence partitioning only for numeric inputs?
No. It can model text formats, output categories, user roles, states, API response classes, configuration values, and many other domains.
What is the difference from boundary value analysis?
Partitioning identifies groups expected to behave alike. Boundary analysis focuses specifically on values at and around the edges between ordered partitions.
