Test data and test plans – OCR GCSE Computer Science lesson (J277)
Pupils learn to choose normal, boundary, invalid and erroneous test data for a program and complete a test plan with expected results.
Lesson 12 of 14 in unit 11.1 Cyber Security and Robust Programs, taught in Year 11, Autumn 1. It answers one big question: How do we choose test data that really tests a program?
By the end, pupils can choose normal, boundary, invalid and erroneous test data for a program and complete a test plan with expected results.
- The Build (the main task)
- Complete a test plan for Kickstand's shoe-size check (3 to 13), giving two normal, two boundary, one invalid and one erroneous test, each with its expected result.
- Support version
- Part-filled test plan: the test types and the first row are given, with a number line from 0 to 16 to choose values from.
- Challenge
- Write a test plan for the postcode length check (6 to 8 characters), including boundary data.
- Real-world link
- Before the shoe-size check goes live, Kickstand's founders want proof it accepts and rejects the right sizes.
- Key words
- Boundary data, Erroneous data and Expected, each with a definition, an icon and a common mix-up on the key vocabulary slide.
- Misconceptions it tackles
- “Boundary data is just outside the allowed range”; “Erroneous data is any input the program should reject”.
- OCR J277 specification
- 2.3.2 (testing: the purpose of testing, iterative and final testing, syntax and logic errors, normal, boundary, invalid and erroneous test data, and refining algorithms).
Every lesson follows the same Code & Commerce structure: a Bell Task recall starter, key vocabulary with definitions and icons, short teaching chunks with a check before pupils move on, The Build (one main task), challenge questions that get harder, and an exit question. Answers reveal one at a time on the slides, and everything is editable PowerPoint and Word.
Pupils can do it all on paper.
Also sold in the Cyber Security and Robust Programs unit bundle, which includes the medium term plan, and in the full-year and complete-course bundles.
What's included
- Slide deck (PowerPoint)
- Lesson plan (Word)
- Worksheet (Word)
- Support worksheet with scaffolds (Word)
- Single-teacher licence: use and adapt it with your own classes
More for GCSE Computer Science (OCR)
See allPupils learn to describe how viruses, worms, trojans, spyware and ransomware work and the harm each can do to a business like Kickstand.
Free sample lessonPupils learn to write and call a procedure and a function in Python, and explain the difference between them and why subprograms are reused.
Pupils learn to describe phishing and other social engineering, spot the signs in a fake message, and explain how staff training reduces the risk.
Written for the specifications named. Not endorsed by or affiliated with any exam board.