GCSE · Computer Science · Eduqas · Spec C500QS
Typical, extreme and erroneous test data
A program can pass every ordinary test you give it and still fail on its own limit. You are about to catch one doing exactly that.
Computer Science · Testing
This check looks fine. Is it?
This routine should accept whole numbers from 1 to 100 inclusive and reject everything else. Pick an input set, then call what it prints BEFORE the program shows you.
score = int(input("Enter a score from 1 to 100: "))if score >= 1 and score < 100 thenprint("Accepted")elseprint("Rejected")endif
Variables
Step 1. The user types 50, and it is stored in score.
Typical: an ordinary valid value. Extreme: valid, but right on a limit. Erroneous: a value the program should reject.
Computer Science · Test data
Same values, different range, different type
A program accepts whole numbers in the range shown. Is each value typical, extreme or erroneous?
The program accepts whole numbers from 1 to 100 inclusive.
Still to sort
Typical (0)
Ordinary valid data, well within the range. The program should accept it.
Where the line is: Typical is valid and comfortably inside the range. If it sits on a limit it is extreme, and if it is outside the range it is erroneous.
Extreme (0)
Valid data AT a limit: the smallest or largest value the program should still accept.
Where the line is: Extreme is still VALID and still accepted. A value beyond a limit is not extreme, it is erroneous.
Erroneous (0)
Invalid data the program should reject: out of range, or the wrong data type.
Where the line is: Erroneous means the program should reject it. A word in a whole-number input is erroneous because of its data type, even though it has no place on the number scale.
Sort each value for the range shown. Then switch the rule and watch the types change.
WHAT YOU'VE LEARNED
A quick recap of today's lesson.
Choose your test data on purpose, because the edges are where programs slip.
What you need to know
- Test data is a set of input values chosen in advance to check whether a program behaves correctly.
- Typical (normal) data is ordinary data well within the valid range. The program should accept it and process it correctly.
- Extreme (boundary) data is valid data at the limits: the smallest and largest values the program should still accept.
- Erroneous data is invalid data that the program should reject, such as a value outside the range or the wrong data type.
Have a goA program accepts whole numbers from 1 to 12. Sam types "banana" and says, "That's extreme data, it couldn't be more extreme!" Typical, extreme or erroneous?
Erroneous.
A value of the wrong data type is invalid data that the program should reject. Extreme data is VALID data sitting on a limit.
- Typical data checks normal use. Extreme data checks the edges, revealing errors like < where <= was needed.
- Erroneous data checks that validation rejects bad input, for example with an error message, rather than accepting it or crashing.
Have a goA check for ages 5 to 18 inclusive is written: age > 5 and age <= 18. Which test value would expose the slip: 11, 5 or 18?
5.
11 is typical and passes either way, and 18 is handled correctly. The slip is at the lower limit, so only extreme data at 5 shows it.
- Extreme data should cover both limits: the lower limit and the upper limit.
- A test plan lists each test with its purpose, the test data, the type of test data and the expected result.
- Decide each expected result before running the program, from what it is meant to do: accepted for typical and extreme data, rejected for erroneous.
- A test plan should include typical, extreme and erroneous data for each input that is tested.
Have a goA game asks for a shirt number (1 to 99) and an age (8 to 18). Priya's plan has typical, extreme and erroneous tests for the shirt number only. What is missing?
The same three types of test data for the age input.
A plan should include typical, extreme and erroneous data for each input that is tested, not just for one of them.
The big picture
Test data is a set of inputs chosen in advance to check that a program behaves correctly. Typical data checks normal use, extreme data checks both limits of the valid range, and erroneous data checks that invalid input is rejected. A test plan sets each test out with its expected result, decided before the program is run.
Key points
Worked example
Problem
A cinema booking program accepts 1 to 6 seats, whole numbers only. Pick test data: a typical value, the extremes, and two erroneous values of different kinds.
⚠ Watch out
Thinking extreme data is invalid, or 'just outside' the range. It is the opposite: extreme data is the smallest and largest values the program should still accept. Values beyond them, and values of the wrong data type, are erroneous.
Memory hook
Middle, edge, outside: typical sits in the middle, extreme sits on the edge (and is still allowed in), and erroneous is outside, or the wrong kind of thing altogether.
Check yourself
Range: whole numbers 0 to 30 inclusive. Label 15, 0, 30, 31 and the word "thirty" as typical, extreme or erroneous, then say which the program should accept.
Flashcards
(11)What is test data?
Typical (normal) test data
Extreme (boundary) test data
Erroneous test data
What does typical data test?
What does extreme data test?
What does erroneous data test?
Whole numbers from 1 to 100: which type are 50, 1 and 100, and 0, 101 and "ten"?
How many extreme tests does a range with a lower and an upper limit need?
What does a test plan record for each test?
When is the expected result for a test decided?
Tap any card to flip it, or use Study as deck to go through them one at a time. In the full lesson these run as a spaced-repetition deck — you rate each card Hard, Good or Easy and the tricky ones keep coming back until they stick.
Learning with Lightbulb is opening soon
You can use this lesson now. Join the waitlist and we'll let you know when the full Lightbulb experience is ready.
Keep me postedMore Eduqas GCSE Computer Science topics
- Presenting test outcomes with commentary
- Program a solution to requirements
- Refining code during development
- Selection in programs
- Sequence in programs
- String manipulation in code
- Subroutines with well-defined interfaces
- Understanding revised requirements
- Using a variety of data types
- Using testing outcomes to inform development
- Validation and verification routines in code
- Variables, operators, inputs, outputs and assignment
How this lesson was checked. This Eduqas GCSE Computer Science (specification C500QS)lesson was published through Lightbulb Learning's human-designed editorial process — the educational standards, accuracy rules and publication checks it must pass were authored and approved by Philip Halpin. It passed subject-specific assessment, automated educational checks and technical publication verification before going live (publication checks completed 16 November 2026). Published pages are monitored, human spot-checking is ongoing across the lesson library, and anything found wrong is corrected or withdrawn. How our lessons are made and checked. Spotted a mistake? Email hello@lightbulblearning.co and we'll review it.