Test plans and test data

About this lesson: Test plans and test data

In short

A program that accepts whole numbers from 1 to 10 should be tested with ordinary values, values at the edges and values it should reject.

Test plans and test data

What you'll explore

Kinds of test data: Normal, boundary, invalid
A program that accepts whole numbers from 1 to 10 should be tested with ordinary values, values at the edges and values it should reject.
Run the test plan: Expected vs actual
Run the tests one at a time, or all at once. The plan records the expected and the actual result. Every test should pass.
Find the mismatch: One test fails
This version has a bug. Run all six tests. Which one fails, and what does that tell you about the code?
Check yourself: Boundary data
A form accepts ages from 13 to 18.

Also in this lesson

  • Common mix-ups
  • 1 to 10
  • Test a friend's rule

Words to know

test plan
A table of tests with inputs and expected results.
normal data
Typical values that should be accepted.
boundary data
Values at the edges of the accepted range.
invalid data
Values that should be rejected.
expected result
What should happen, written before testing.

Sources

  • BBC Bitesize KS3 Computer Science
  • Raspberry Pi Foundation, Computing curriculum resources

An interactive lesson with a live experiment: move the sliders, press the buttons and answer quick questions. 4 short steps and a 6-question quiz. Part of the Family plan. Written and checked by Shalo Lab. Last updated 11 November 2026.

← Binary search · Three kinds of error →

All lessons in Term 2 · Computing · Age 13