Test extreme and boundary values
Distinguish accepted endpoints from the nearest rejected values and verify both sides of a rule.
Section 7 · Algorithm design and problem-solving
This sequence follows Cambridge IGCSE Computer Science 0478, 2026–2028 syllabus Version 6. It covers subject content Topic 7 only. The separately published 2029–2031 syllabus is not mapped here. Practice is original, self-checked and does not award an official Cambridge grade. Full timed papers and human subject-teacher review remain outstanding.
Before you begin
- No programming language is required. Be comfortable with place value and multiplication; each lesson introduces the computer-science notation it uses.
Work on paper. Try each question before revealing help, and explain why your method works.
Quick readiness check
For lengths 5–12 inclusive, what is the largest accepted value?
What you will learn
- Define extreme test data
- Define boundary test data
- Test accepted and rejected values around limits
Test limits deliberately
Extreme data is the largest or smallest acceptable value. For a quantity from 1 to 20, the extremes are 1 and 20.
Apply and check the rule
Boundary test data includes the largest and smallest acceptable values and the nearest corresponding rejected values. For the same range, test 0, 1, 20 and 21. This checks both inclusion of endpoints and rejection immediately outside them.
Pause and explain
Which set tests both boundaries for an integer range 1–5 inclusive?
Worked example
A mark is valid from 0 to 100 inclusive. Give the extreme and boundary test values.
Show the worked solution
- Extreme accepted values are 0 and 100.
- The nearest rejected values are −1 and 101.
- Expected: accept endpoints, reject outside values.
Answer Extreme: 0 and 100. Boundary set: −1, 0, 100, 101.
Try a topic test
Choose Easy, Normal or Difficult. Save your answers and open worked review after finishing.
Test this topic →From guided practice to a new situation
Write your answer and reasoning first. Use a hint only if you are stuck. The model solution is for self-checking; your written work is not automatically marked.
A password length must be 8–16 characters inclusive. Give all four boundary values and expected acceptance.
Give me a hint
For each end, include the endpoint and nearest outside length.
Compare my reasoning
- 7 is below; 8 is lower endpoint.
- 16 is upper endpoint; 17 is above.
- Accept 8 and 16; reject 7 and 17.
7 reject, 8 accept, 16 accept, 17 reject.
Look for these in your work
- Lower pair
- Upper pair
- Expected outcomes
An algorithm accepts scores when Score > 0 and Score < 100. Which two intended endpoints does it incorrectly reject?
Give me a hint
Compare strict comparisons with inclusive specification wording.
Compare my reasoning
- Score > 0 excludes 0.
- Score < 100 excludes 100.
- If both endpoints are allowed, use >= 0 and <= 100.
It rejects 0 and 100. Use inclusive comparisons if the specification includes those endpoints.
Look for these in your work
- Lower endpoint
- Upper endpoint
- Correction
A program is tested at 1 and 20 for a permitted range 1–20 but not at 0 or 21. Explain what remains untested.
Give me a hint
Accepted endpoints do not test rejection just outside them.
Compare my reasoning
- The program may accept values below 1.
- It may accept values above 20.
- Test 0 and 21 and confirm both are rejected.
The tests do not show that out-of-range values are rejected. Add 0 and 21 as boundary values and check the rejection response.
Look for these in your work
- Below-bound risk
- Above-bound risk
- Missing tests
Common mistakes
- Calling a rejected value extreme
- Testing only one endpoint
What can you explain now?
What is the difference between extreme and boundary data?
Compare with the explanation
Extreme is an accepted endpoint; boundary data also includes the nearest rejected values
Boundary tests both sides of each limit.
After trying it yourself, choose your next review. This is your self-assessment.
Your review choice appears on Today. Sign in to sync it across devices.
Make it stick
Which values form a boundary test set for an inclusive range?
If you needed the solution, close it and solve the problem again from a blank page. A correct answer is stronger when you can explain the reason for each step.