GCSE · Computer Science · OCR · Spec J277
Normal test data
Your program only accepts a stream duration of 20 to 40 minutes. Time to test it: what do you type in first?
Computer Science · Testing
Sort the test data
Pick an input, then pick the kind of test data it is. Commit first, then read why.
Still to sort
Normal (0)
Valid data the program should accept: the input you would expect to be entered.
Where the line is: Normal data is valid and expected. Boundary data sits on the edge of the range.
Boundary (0)
On the edge of being valid. On or just inside the edge should be accepted; slightly outside should be rejected.
Where the line is: Boundary data is still a number. Erroneous data is the wrong kind of thing altogether.
Erroneous (0)
Data the program should not accept, because accepting it would cause an error.
Where the line is: Erroneous data is the wrong kind of input, such as a string where an integer is required.
One program. It accepts a stream duration of 20 to 40 minutes, and it needs a whole number. Which kind of test is each input?
Computer Science · Testing
Where does each input go?
Choose a branch to follow the route. Exactly one route is taken for each input.
Is it a whole number? → Is it from 20 to 40?
3 possible routes.
The program checks every input in the same order. Walk each route and see which test it belongs to.
WHAT YOU'VE LEARNED
A quick recap of today's lesson.
Which inputs a program should happily accept, and how to record that test.
What you need to know
- Testing checks that a program works as expected with different inputs.
- A thorough test uses a range of data (normal, boundary and erroneous), not only data that will make the program fail.
- Normal test data is valid data the program should accept: the normal data you would expect to be entered.
Have a goYour classmate says: "Normal data is pointless. I only test with data that breaks the program." What does normal data check that their tests never would?
That the program accepts valid, expected input and works as expected.
Breaking tests only show what gets rejected. Normal data shows the program does its actual job on the input it was built for.
- Boundary test data is on the edge of being valid. Values on or just inside the boundary are valid; slightly outside is invalid.
- Erroneous test data should not be accepted, because accepting it would cause an error. A string where an integer is required is one example.
Have a goA program needs a whole number. Someone types the word "banana". Is that normal, boundary or erroneous data?
Erroneous.
It is a string where an integer is required, not a number on the edge of a range, and accepting it would cause an error.
- A test table records each test: number, description, input, expected output, actual output and, if unsuccessful, how it was fixed.
- You predict the expected output before running the test, then compare it with the actual output.
- A program validates a stream duration as 20 to 40 minutes. Input 22 is normal data and should be accepted and stored.
- Its expected output also includes converting 22 minutes to 1,320 seconds (22 × 60).
Have a goSame program, 20 to 40 minutes. What expected output would you predict for the normal input 30?
Accepted and stored, and converted to 1,800 seconds (30 × 60).
Same method as 22: normal data is accepted, and minutes are multiplied by 60 to give seconds, not added.
- If actual results do not match expected results, the program is checked for errors. This process is called debugging.
The big picture
Normal test data is valid, expected input that a program should accept. You will sort inputs into normal, boundary and erroneous data, then write a normal test into a test table with its expected output predicted first.
Key points
Worked example
Problem
The stream-duration program accepts a whole number of minutes from 20 to 40 and converts it to seconds. Plan one test of each kind, predicting each expected output first.
⚠ Watch out
Calling 19 or 41 erroneous. They are numbers, just slightly outside the boundary, so they are boundary tests that should be rejected. Erroneous data is the wrong kind of input, like a string where an integer is required.
Memory hook
Normal data walks straight through the door: valid, expected, accepted. Boundary data stands right on the doorstep. Erroneous data should be turned away at the door.
Check yourself
A program accepts a whole number from 20 to 40. Decide whether 28, 40 and "forty" are normal, boundary or erroneous data, and say what the program should do with each.
Flashcards
(10)What is normal test data?
What is boundary test data?
What is erroneous test data?
Which kinds of test data make a thorough test?
Should a test plan use only data that will make the program fail?
What does testing check?
What does a test table record?
When is the expected output written?
What is debugging?
Why is 19 not erroneous data in a program that accepts 20 to 40?
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 OCR GCSE Computer Science topics
How this lesson was checked. This OCR GCSE Computer Science (specification J277)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 7 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.