OCR · GCSE · Computer Science
Course version: J277 · Version from Sept 2022
Selecting and using suitable test data Normal Boundary Invalid/Erroneous
Full specification wording
Testing: Selecting and using suitable test data Normal Boundary Invalid/Erroneous
Testing requires carefully chosen data to verify program behaviour.
Checked against the OCR J277 specification on .
- Point 4 of 5
- 4 key terms
Study notes
From the checked teaching notes for this specification point.
The idea
Testing requires carefully chosen data to verify program behaviour. Normal data is typical, valid input that should be accepted, such as entering 25 for an age field accepting 18 to 65. Boundary data sits exactly on the limits of valid input, such as 18 and 65, because logic errors frequently occur at these edges. Invalid or erroneous data is input that should be rejected, such as 17, 66, or 'abc' for the same age field. To select suitable test data, identify the valid range, choose normal values, boundary values at each limit, and invalid values that break the rule. Using this data involves running the program, comparing the actual output with the expected output, and recording whether the test passes or fails in a structured test plan.
What earns the marks
- Normal data is valid, typical input that lies well inside the accepted range and should produce the expected result.
- Boundary data is input at the exact limits of a valid range, used because logic errors frequently occur at these edges.
- Invalid or erroneous data is input that does not meet the stated rule and should be rejected by the program.
- Using test data involves running the program, comparing actual output with expected output, and recording the outcome.
Common mistakes and how to put them right
Choosing only normal data and ignoring boundaries and invalid values.
Put it right: Include at least one normal value, boundary values at each limit, and invalid values.
Treating a boundary value as invalid when it is actually allowed.
Put it right: Check the wording of the requirement, for example '18 to 65 inclusive' means 18 and 65 are valid boundary values.
Recording only the input without the expected output.
Put it right: Write both the input and the expected result so the test can be judged objectively.
Exam tips
- For each rule, give one normal value, the boundary values at each end, and at least one clearly invalid value.
- State the expected result for each value so the examiner can see why the data is suitable.
Try the lesson
The start of the Testing: Selecting and using suitable test data Normal Boundary Invalid/Erroneous lesson, made from checked teaching notes for this specification point.
Have a go first
A program asks the user to enter their age in years. The program accepts ages from 0 to 120 inclusive. Which type of test data is an age of 14?
Listen
Testing requires carefully chosen data to verify program behaviour. Normal data is typical, valid input that should be accepted, such as entering 25 for an age field accepting 18 to 65. Boundary data sits exactly on the limits of valid input, such as 18 and 65, because logic errors frequently occur at these edges. Invalid or erroneous data is input that should be rejected, such as 17, 66, or 'abc' for the same age field. To select suitable test data, identify the valid range, choose normal values, boundary values at each limit, and invalid values that break the rule. Using this data involves running the program, comparing the actual output with the expected output, and recording whether the test passes or fails in a structured test plan. A strong answer earns marks for these points. Normal data is valid, typical input that lies well inside the accepted range and should produce the expected result. Boundary data is input at the exact limits of a valid range, used because logic errors frequently occur at these edges. Invalid or erroneous data is input that does not meet the stated rule and should be rejected by the program. Using test data involves running the program, comparing actual output with expected output, and recording the outcome. A common slip: Choosing only normal data and ignoring boundaries and invalid values. Instead, include at least one normal value, boundary values at each limit, and invalid values. Exam tip: For each rule, give one normal value, the boundary values at each end, and at least one clearly invalid value.
See it
Key words
Say what each word means before you turn the card.
Normal data
Try answering aloud or in your head before turning the card.
Boundary data
Try answering aloud or in your head before turning the card.
Invalid or erroneous data
Try answering aloud or in your head before turning the card.
Using test data
Try answering aloud or in your head before turning the card.
See every definition
- Normal data
- Valid, typical input that lies well inside the accepted range and should produce the expected result.
- Boundary data
- Input at the exact limits of a valid range, used because logic errors frequently occur at these edges.
- Invalid or erroneous data
- Input that does not meet the stated rule and should be rejected by the program.
- Using test data
- Running the program, comparing actual output with expected output, and recording the outcome.
Label the diagram
Some boxes have lost their names. Pick the right name for each number.
1Box 1
2Box 2
3Box 3
There is more to this lesson
The full lesson goes on to check your understanding and help you earn the marks. Create a free account to carry on, with your progress saved.
A week of Premium from your first lesson · Then the free plan continues · No card, no charge
Test your understanding of Testing: Selecting and using suitable test data Normal Boundary Invalid/Erroneous
Active recall beats re-reading. Take an instant quiz now to test what you’ve learned and lock it into long-term memory.
A week of Premium from your first lesson · Then the free plan continues · No card, no charge