Testing a program

About this lesson: Testing a program

In short

A test plan lists test inputs and the expected result for each, written before running. Then you record the actual results. Run the tests, fix the bug, and run them all again.

Testing a program

What you'll explore

Test plans: Expected, then actual
A test plan lists test inputs and the expected result for each, written before running. Then you record the actual results.
Test data: Normal, boundary, invalid
One successful test isn't enough. Good test data includes normal values, boundary values at the edges, invalid values and the wrong type.
Check yourself: Boundary test
A game allows scores from 0 to 100.

Also in this lesson

  • Common mix-ups
  • Four kinds of test data
  • Testing step by step
  • Test the tester

Words to know

test plan
A table of test inputs, expected results and actual results.
expected result
What should happen, written before testing.
actual result
What really happened.
boundary data
Values on or just past the edges of a range.
invalid data
Values the program should refuse.
bug
A mistake in a program.

Sources

  • BBC Bitesize GCSE Computer Science: Testing

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

← Developing in iterations

All lessons in Term 3 · Computing · Age 12