Module 2 · Manual testing, end to end Lesson 5 of 15
Boundary values and equivalence partitioning
Most defects live at the edges: empty, one item, exactly the limit, one past the limit, and the maximum. Testing the middle everywhere else is a waste of a day.
The concept
Testing every possible input is impossible, so you test the edges of the groups. For a field accepting ages 18 to 60, the interesting values are 17, 18, 19, 59, 60 and 61 — plus a blank — not 25 and 40. This is equivalence partitioning (one value per group) and boundary value analysis (each edge and just past it), and it is the standard answer to "how would you test this field?".
Apply the same thinking to numbers, dates, text lengths, file sizes and quantities. A date range of two days is one group, and end-of-month, leap years and the timezone of the server are the edges. Two minutes of listing groups replaces an hour of random clicking.
# Valid range 1..100.
# Equivalence: one value from inside is enough - you do not test all 100.
# Boundaries: test the EDGES, where bugs actually live.
cases = [0, 1, 2, 99, 100, 101] # just outside . edge . just inside
def is_valid_age(n):
return 1 <= n <= 100
for n in cases:
print(n, is_valid_age(n))Common mistakes
The mistake is picking values in the middle of the range because they are comfortable, which is where software almost never breaks. Bugs cluster at zero, one, the maximum, the empty string, and the first and last row of any list.
Worked example
A discount valid for orders of ₹5,000 and above needs four cases around 4,999, 5,000 and 5,001 — not four cases at ₹10,000 with different wording. Same effort, entirely different value.
Your practice task
Find two numeric rules in your own practice sheet and write the boundary set for both, including the off-by-one cases.
Do this before moving on. Reading a solution teaches the shape of it; typing it teaches you.
Key takeaway
Testing every possible input is impossible, so you test the edges of the groups.
Keep your place in this course
A free account saves which lessons you have finished and unlocks the certificate. The lesson itself stays free to read.
Create free account or sign inCourse complete
You finished every lesson.
Your certificate is ready, and the projects you built are the proof to attach to an application.
Almost there
15 lessons left of 15
Finish every lesson to unlock the certificate. Each one ends in a practice task — do them and the final project brief writes itself.