You can't test every possible value, so don't try. Learn to split inputs and outputs into groups that behave the same, test one value from each, and catch more bugs with far fewer tests.
beginner Mobile & web
Short on time? Switch to the quick version.
Your progress
You’re testing the sign-up screen of a fitness app. The requirement is one line long: “Users must be 18 to 60 years old (whole years).” There’s an Age field and a Continue button.
So you type 18. It works. You type 19. Works. 20, 21, 22… After ten minutes you’ve typed 43 ages and you haven’t even tried 0, -5, 150, “abc”, 25.5 or leaving the field empty. And this is one field on one screen.
Even a tiny field accepts a huge number of possible inputs: every whole number, every decimal, negative numbers, letters, emoji, spaces, pasted text, nothing at all. Multiply that by every other field on the form and every phone and browser, and you get more combinations than anyone could run in a lifetime.
This is one of the seven testing principles from What Is Software Testing?: exhaustive testing is impossible. The real skill is choosing a small set of tests that still finds the bugs. EP is the tool for exactly that.
The big idea: values that behave the same
An equivalence partition (also called an equivalence class) is a group of values that the software should treat in exactly the same way. If one value in the group works, the others should too. If one fails, the others probably fail the same way.
That gives us the core rule of EP:
Split the possible values into partitions, then test one representative value from each partition.
For our fitness app, the age rule creates three partitions on the number line:
Age field · fitness app sign-up (18–60)
≤ 17
Too young · rejected
18 – 60
Accepted
≥ 61
Too old · rejected
Three partitions on the line, so three tests: for example 12, 35 and 72. Testing 36 as well adds nothing new, because it's in the same partition as 35.
If one value in the group works, the others should too. That's why one representative value per partition is enough.
The Age field accepts 18 to 60. You already tested 35. What does testing 36 add?
35 and 36 are both in the 18–60 partition, so the app should treat them the same way. A value from a different partition, such as 12 or 72, tells you more.
You can't test every value, so you group values the app treats the same and test one from each group.
There can be more than one valid partition too. That happens whenever the app does something different for different valid values, like the cinema’s child, adult and senior prices. All three are valid, but each gives a different result, so each needs its own test.
Doing EP step by step
Here’s the process you’ll follow every time, using the fitness app’s age field.
Find the input (or output, see Outputs below) and its rule. “Age: whole years from 18 to 60.”
Find where the behavior changes. Below 18 the app rejects you; from 18 it accepts; from 61 it rejects again. Those change points split the line into partitions.
Add the partitions that aren’t on the line. Empty field, non-numeric text, decimals. Ask: “What else could a user (or a bug) send here?”
Label each partition valid or invalid. Valid = should be accepted. Invalid = should be rejected with a helpful message.
Pick one representative value per partition. Something clearly inside it: 35 rather than 18. (The edges get their own technique, Boundary Value Analysis.)
Turn them into test cases, combining valid partitions and keeping invalid ones separate (explained below in How many test cases do you need?). See How to Write Test Cases for the format.
The result for the age field:
Partition
Type
Test value
Expected
18 to 60
Valid
35
Accepted
17 or less
Invalid
12
“You must be at least 18”
61 or more
Invalid
72
“This plan is for ages 18 to 60”
Empty
Invalid
(blank)
“Enter your age”
Not a number
Invalid
abc
“Age must be a number”
Decimal
Invalid
25.5
“Enter whole years”
Six tests instead of hundreds, and each one checks something genuinely different.
Check this part
Testing values the app should reject is called…
Invalid partitions hold values that should be rejected with a clear error message. Testing them is negative testing.
Which of these is a partition that isn't on the number line for the Age field?
Empty input, non-numeric text and decimals can't be drawn on the number line, but each is its own partition and needs its own test.
Valid partitions should be accepted, invalid ones rejected with a clear message, and some partitions (empty, text, decimals) aren't on the number line.
Part Not started
Where partitions hide
What you’re testing
Example
Partitions
A number range
Cart quantity 1–10
0 or less · 1–10 · 11+
Text length
Promo code 6–10 chars
empty · 1–5 · 6–10 · 11+
A set of options
Payment method
each option behaves differently
A format
Email
valid · missing @ · missing domain…
An output
Shipping by order total
€4.99 · €2.99 · free
If a field is optional, empty is a valid partition (for example, no promo code means no discount). In a required field, the same empty value is invalid: the rule decides the partition.
Partitions aren’t just for number fields. Once you start looking, you’ll see them everywhere.
Numbers and ranges
The classic case: a minimum, a maximum, and everything in between. In a shop’s cart, the quantity of one item must be 1 to 10.
Cart quantity (1–10)
≤ 0
Error
1 – 10
Cart updates
≥ 11
"Max 10 per order"
Plus the off-the-line partitions: empty (the user deletes the number and taps away: does the cart show 0, the odd text “NaN” (how some apps display “not a number”), or the old value?), decimals (2.5 socks) and text. See the shopping cart and checkout lesson for more cart traps.
Some rules have only one limit: “withdraw at least €10” has a valid partition (€10 and up) and one invalid partition (under €10), plus empty and non-numeric.
Text length
For text fields, the “number” is the length. A food delivery app’s promo code field is optional, but a filled-in code must be 6 to 10 characters:
Promo code length (optional, 6–10 characters)
0
No code · OK
1 – 5
Too short
6 – 10
Format OK
≥ 11
Too long
Because the field is optional, empty is a VALID partition here. In a required field, the same empty value would be invalid. Same value, different rule, different partition.
When the input is a choice from a list, each option that leads to different behavior is its own partition. Options that behave identically can share one.
Input
Partitions
Why
Payment method
Card · PayPal · Apple Pay / Google Pay · Pay on delivery
Each one runs a different flow (extra bank confirmation, a jump to the PayPal site, the phone’s built-in pay screen, no payment step)
Shipping country (EU shop)
Home country · other EU country · non-EU country · no country chosen
Different shipping prices, VAT and customs rules
Country list for the phone prefix
One country per format group, not 195 countries
Countries with the same number format behave the same
You would not test all 195 countries in a dropdown. You’d ask the team which countries are treated differently (different tax, currency, address format, delivery rules) and pick one from each group. Don’t forget the invalid partition: nothing selected.
Formats
Some inputs are valid only in a certain shape. The best-known example is email:
The three middle rows show the same message, but the app checks each rule separately, and any one of those checks can be missing. When different rules sit behind the same result, give each rule its own partition.
Real email rules are surprisingly complex (plus signs like anna+promo@shop.com and long domain endings like .travel are valid), so they are good extra partitions to check against the requirement. More on this in Login and Sign-up.
The same thinking works for phone numbers, postcodes, card expiry dates (MM/YY) and IBANs.
Outputs
EP isn’t only for what the user types. You can also partition outputs: the different results the app can produce. Then you pick inputs that land you in each output partition.
A shop calculates shipping from the order total:
Shipping cost by order total (output partitions)
under €20
€4.99 shipping
€20 – 49.99
€2.99 shipping
≥ €50
Free shipping
All three are valid, but each produces a different output. Three tests: e.g. carts worth €12, €35 and €80.
Other output partitions you’ll meet: a banking app showing a balance as positive, zero or negative (overdrawn); a search returning no results, one result or many (see Search, Filters and Sorting); a fitness app’s weekly summary for “goal reached” vs “goal missed”.
Check this part
A promo code field is optional; filled-in codes must be 6 to 10 characters. Which partition is empty input in?
Because the field is optional, leaving it empty is allowed (no discount is applied). In a required field, empty would be invalid. The rule decides the partition.
A shop's payment screen offers Card, PayPal and Pay on delivery. How should you partition this input?
Each method runs a different flow, so each is its own partition. "Nothing selected" is an invalid partition if a method is required.
Partitions exist for number ranges, text lengths, option lists, formats and outputs.
Part ProNot started
How many test cases do you need?
At least one per partition. Then use one rule to keep things clear:
Valid partitions can share a test. One sign-up with a valid age, a valid email and a valid country covers three valid partitions at once.
Invalid partitions get a test each. If you enter age 15 and a broken email together, the app may only complain about the email, and you never find out whether age 15 is rejected.
The minimum is one test per partition. The share of partitions you’ve tested is your EP coverage: if you identified 6 partitions and tested 4, that’s 67% coverage. Aim for 100%. Coverage always means “how much of some list did the tests touch”: here the list is partitions, in the last lesson it was lines of code.
But a form has several fields, and that’s where the combining rule matters.
Combine valid, isolate invalid
Test 1: age 35, email anna@shop.com, country Germany → account created (three valid partitions in one go)
Test 2: age 12, everything else valid → age error
Test 3: email anna@, everything else valid → email error
Several invalid values at once
Test 1: age 12, email anna@, country none → “Enter a valid email”
Did the app reject age 12? You can’t tell. The email error may have hidden the others.
Why does this work?
Valid values can be combined because, if everything passes, every partition has been shown to work. If one test fails, you investigate and split it.
Invalid values must be tested one at a time because of error masking: many apps stop at the first problem they find, or show only one message. A second invalid value can hide behind the first, and a real bug (age 12 being accepted) slips through.
So for a sign-up form with three fields that have 6, 5 and 3 partitions, you don’t need 6 × 5 × 3 = 90 tests. You need a few tests that cover all valid partitions together, plus one test for each invalid partition. That’s usually 10–15 tests, which you can actually run.
Check this part
Why should invalid partitions be tested one at a time?
This is error masking. If the app only reports the first problem, a second invalid value may never be checked, and a real bug can slip through.
Which values can safely share one test?
If everything passes, every valid partition has been shown to work. Invalid values stay separate so one error can't hide another.
At least one test per partition: combine valid partitions in one test, and test each invalid partition on its own.
The rest of this lesson is in Bugwise Pro
The last parts of every lesson are part of Bugwise Pro. Sign in to unlock them if you have it.
Partitions must not overlap, and must leave no gaps
Mixing invalid values in one test
Age 12 + broken email together
One invalid partition per test
No non-numeric input for numbers
Never typing “abc” in Quantity
Add a “not a number” partition
Splitting without a reason
Testing ages 20, 30, 40 and 50
Only split where the rule behaves differently
Testing only the happy path
Only valid partitions
Invalid partitions usually outnumber valid ones
Where EP stops and boundaries begin
EP tells you that 35 represents the whole 18–60 partition. But what if the developer wrote the rule as “older than 18” (age > 18) instead of “18 or older” (age >= 18)? Then 35 still passes and the bug survives, because the mistake lives exactly on the edge, at 18.
That’s why EP has a partner technique: Boundary Value Analysis. EP picks a value from the middle of each partition; BVA tests the edges between them. You’ll almost always use them together.
Check this part
The Age field opens a number keyboard on phones. Do you still need a "not a number" partition?
The keyboard is a convenience, not a validation. Users can paste, and anyone can call the API directly, so the app and server must handle non-numeric input.
Your partitions are "0–18" and "18–60". What's wrong?
Partitions must not overlap, and must leave no gaps. Every value belongs to exactly one partition.
Forgetting the empty partition, overlapping partitions, and skipping non-numeric input in number fields.
The rest of this lesson is in Bugwise Pro
The last parts of every lesson are part of Bugwise Pro. Sign in to unlock them if you have it.
Pick a requirement, split the number line where the behavior changes, label each partition, choose a value to test, and decide which partitions live off the line. The trainer tells you what you got right and why.
🧩 Partition builder
Split the line into partitions, label each one, pick a value to test from each, then check your work.
Fitness app · sign-up form
The "Age" field accepts whole years from 18 to 60. Anything else shows an error.
1. Split the line where the behavior changes
Click the line to add (or remove) a split. A split at X means "a new partition starts at X". Unit: years.
01020304050607080
2. Label each partition and pick one value to test
All values
3. Which partitions can't be drawn on the line?
Tick the ones that are real, separate partitions for this requirement.
Test it: which partition does your value fall into?
Now be the tester. Type values into the app and watch which partition each one hits. Try to cover every partition with as few values as possible; a second value from the same partition teaches you nothing new.
🔬 Test it: which partition is this value in?
Type a value into the app and submit it. Try to hit every partition with as few values as you can.
Create account
Partitions
Covered 0/6
Emptye.g. (blank)
Not a numbere.g. abc
Decimale.g. 25.5
Below 18e.g. 12
18 – 60e.g. 35
Above 60e.g. 72
Green = valid, red = invalid, blue = a different output.
Your turn: a small spec
A fitness app lets users set a daily step goal:
The step goal is a whole number from 1,000 to 50,000. The field is required. Users also pick a goal type: Walking, Running or Cycling. Cycling goals are measured in kilometers instead of steps, so the screen changes when Cycling is selected.
Write down the partitions for both inputs, mark each one valid or invalid, pick a test value for each, and work out the smallest set of tests that covers them all.
Show a model answer
Step goal partitions
Partition
Type
Test value
1,000 – 50,000
Valid
8,000
999 or less
Invalid
500
50,001 or more
Invalid
80,000
Empty
Invalid
(blank)
Not a number
Invalid
“ten”
Decimal
Invalid
7500.5
Goal type partitions: Walking and Running behave the same (steps), so they can share one partition; Cycling is its own partition (kilometers, different screen); and “nothing selected” is invalid if the type is required (ask!).
Tests: two valid tests (8,000 steps + Running; a valid km goal + Cycling), plus one test for each of the five invalid step-goal partitions and one for “no goal type”. That’s 8 tests. If you also tested Walking separately, that’s a reasonable extra, but EP says it adds little.
Bonus question for the team: is the 1,000–50,000 range also used for the Cycling km goal? Probably not, so Cycling may need its own range partitions.
Example test cases
TC-EP-01Sign-up accepts an age inside the valid partitionpositivehigh