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.

8 of 8 still to sort.

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?

Exam line: Normal test data is valid data the program should accept: the input you would expect to be entered.
Watch out: 19 and 41 are not erroneous. They are numbers, just slightly outside the boundary, so they are boundary tests and the program should reject them.

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.

On A stream duration is entered. 2 branches to choose from.

The program checks every input in the same order. Walk each route and see which test it belongs to.

Exam line: Each kind of test data exists to check a different route through the program.

Computer Science · Test tables

Write the test-table row

Complete the test-table row for the normal input 22 in the stream-duration program (20 to 40 minutes).

  1. Test 1. Description: normal data, a whole number inside the range. Input: 22.Test number, description and input are filled in first.
  2. missing step
Which line is step 2?

Computer Science · Testing

What do you think a test plan is for?

Your class is planning tests for the stream-duration program, which accepts 20 to 40 minutes.

Which of these is closest to what you think right now?
How sure are you?

Computer Science · Your turn

Write it in your own words

A program validates a stream duration as between 20 and 40 minutes. Explain what is meant by normal test data, and give one normal test for this program, including the expected output. [3 marks]

0 words · your answer stays on this page and is not sent anywhere.

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

1Normal test data is valid data the program should accept, the input you would normally expect.
2Thorough testing uses normal, boundary and erroneous data, and never only data that makes the program fail.
3Boundary data sits on the edge of valid; erroneous data should not be accepted because it would cause an error.
4A test table holds the test number, description, input, expected output, actual output and, if needed, how it was fixed.
5Predict the expected output first, compare it with the actual output, and debug if they do not match.

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?
Data that should be accepted by the program because it is valid: the normal data you would expect to be entered.
What is boundary test data?
Values on the edge of being valid. Values just on or within the boundary are valid; those slightly outside are invalid.
What is erroneous test data?
Data the program should not accept, because accepting it would cause an error, for example a string entered where an integer is required.
Which kinds of test data make a thorough test?
A range: normal, boundary and erroneous data.
Should a test plan use only data that will make the program fail?
No. A test plan should not include only failing data; it should use a range of test data.
What does testing check?
That a program works as expected with different inputs.
What does a test table record?
Test number, description, input, expected output, actual output and, if the test was unsuccessful, how it was fixed.
When is the expected output written?
Predicted before the test is run, then compared with the actual output.
What is debugging?
The process of checking a program for errors when the actual results do not match the expected results.
Why is 19 not erroneous data in a program that accepts 20 to 40?
It is a number slightly outside the boundary, so it is boundary data. Erroneous data is the wrong kind of input, like a string where an integer is required.

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 posted

More OCR GCSE Computer Science topics

See the full OCR Computer Science curriculum →

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.