Testing

Computer ScienceOCRGCSEUnit: 3.2 Programming
Free taster
5 of 6 sections open
The basics

Finding Bugs Before Users Do

Finding Bugs Before Users Do

Testing is trying to break your own program before releasing it. Like a car manufacturer crash-testing vehicles - better to find problems in the factory than on the road! You need to test with normal data (should work), extreme/boundary data (edge cases), and erroneous/invalid data (should be rejected). If you only test with data you expect, you'll miss bugs users will find immediately.
What is normal test data?: Typical, everyday values the program should handle
Key terms

Computer Science glossary

What is normal test data?
Typical, everyday values the program should handle
What is boundary test data?
Values at the edge of valid ranges (just inside and outside limits)
Exam tip

Earn the mark scheme marks

Exam Tips

  • Boundary = both sides: Test value just inside AND just outside the limit
  • State expected outcome: Always say what SHOULD happen for each test
  • Iterative catches early: Finding bugs early is cheaper and easier to fix

Now try it yourself

Quiz · Question 1 of 15

A program accepts scores between 0 and 100. Which value is an example of erroneous test data?

Tap an answer to check it

Revise every Computer Science topic, free during alpha

Testing is one of 60 topics on PrepWise — all aligned to your exam board.

Start revising free →