AQA · GCSE · Computer Science
Course version: 8525 · Version from Sept 2020
Robust and secure programming: erroneous data.
Erroneous data is test data that is incorrect or invalid for the problem, such as entering letters where a number is expected or a date like 31/02/2025.
Checked against the AQA 8525 specification (opens in a new tab) on .
- Point 10 of 14
Study notes
From the checked teaching notes for this specification point.
The idea
Erroneous data is test data that is incorrect or invalid for the problem, such as entering letters where a number is expected or a date like 31/02/2025. It is used to check that a program rejects or handles invalid input gracefully, for example by displaying an error message or prompting again, rather than crashing or producing a wrong result. In the context of robust programming, testing with erroneous data helps confirm that validation routines and error handling work as intended. For a program that asks for a test score between 0 and 100, erroneous data could be -5, 101, or 'abc'. The program should not accept these values; it should identify them as invalid and respond appropriately. This is distinct from normal data, which is valid and expected, and boundary data, which tests the limits of valid ranges.
What earns the marks
- Erroneous data is data that is invalid or incorrect for the given problem.
- Examples include values outside the valid range, wrong data types, or impossible dates.
- The program should reject erroneous data, often by showing an error message or asking for re-entry.
- Testing with erroneous data helps verify that validation and error handling routines work correctly.
Common mistakes and how to put them right
Confusing erroneous data with boundary data.
Put it right: Boundary data tests the edges of valid input, while erroneous data is outside the valid range or of the wrong type.
Thinking that erroneous data should be accepted and processed.
Put it right: The purpose is to ensure the program rejects it gracefully.
Believing that any unexpected input is erroneous.
Put it right: Some unexpected inputs may still be valid, so the definition depends on the problem's requirements.
Exam tips
- When asked to give examples of erroneous data, choose values that are clearly invalid for the stated problem, such as a negative age or a non-numeric input.
- Explain what the program should do when it receives erroneous data, such as displaying an error message or asking for input again.
- Remember that erroneous data is one of the three main types of test data: normal, boundary, and erroneous.
Try the lesson
The start of the Robust and secure programming: erroneous data. lesson, made from checked teaching notes for this specification point.
Have a go first
A program asks the user to enter their age. The user types the word "twelve". The program then crashes when it tries to do arithmetic with this input. What type of data has the user supplied?
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 Robust and secure programming: erroneous data.
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