Validation, verification and test data
About this lesson: Validation, verification and test data
In short
Validation is an automatic check that data is reasonable before a program uses it. Try each kind of check.

What you'll explore
- Validation: Is the data sensible?
- Validation is an automatic check that data is reasonable before a program uses it. Try each kind of check.
- Verification: Was it copied correctly?
- Verification checks that data has been entered exactly as in the original. Try double entry and a visual check.
- Kinds of test data: Normal, boundary, extreme, abnormal
- Good testing uses several kinds of data: normal values, values at the edges (boundary/extreme), and values that should be rejected (abnormal).
- A test plan: Expected vs actual
- A test plan lists each test, the data, the expected result and the actual result. Run one test, then all of them.
- Check yourself: Which check?
- A form asks for a month number. It should reject 0 and 13.
Also in this lesson
- Step by step
- Validation checks
- Watch out for these
- More than the lesson
- Stretch your brain
- Try it yourself
Words to know
- Validation
- An automatic check that data is sensible.
- Verification
- A check that data matches the original.
- Boundary data
- Values at the edge of the accepted range.
- Abnormal data
- Data that should be rejected.
- Check digit
- An extra digit calculated from the others to catch errors.
- Test plan
- A table of tests with expected and actual results.
Sources
- Raspberry Pi Foundation, Isaac Computer Science: validation and verification
- OWASP: Input Validation Cheat Sheet
- NASA: Mars Climate Orbiter mishap report (1999)
- BBC Bitesize, GCSE Computer Science: testing