BuryComputing
OCR J277 · 2.3.2 TestingTesting
🎯 0/6
Step 1

Why do we test?

Checking a program works, and when to check it.

Why do we test?

When do we test?

Key facts

The purpose of testing = to check the program works as it is meant to, meets the requirements, and to find errors so they can be fixed.
Type of testingWhenWhat is tested
Iterative testingDuring developmentEach module, as it is written. It is repeated.
Final (terminal) testingAt the end, before releaseThe whole program, with all the modules joined

ActivitySort it: iterative or final?

ActivityWhy do we test?

Step 2

Syntax and logic errors

Two types of error. One stops the program. One does not.

Two types of error

The program should…
Output

Key facts

Syntax error = an error which breaks the rules of the programming language, so the program will not run.
Logic error = an error which lets the program run, but gives an unexpected output.
Syntax errorLogic error
Does the program run?NoYes
Is the output correct?There is no outputNo, it is unexpected
Examplepritn("Hi") or a missing bracket- used instead of +

ActivityBug hunt

ActivityFix the line

Step 3

Test data

Choosing data to test with.

A mark from 0 to 100

A program accepts a mark from 0 to 100. Tap a test value.

Key facts

Test data is chosen to check a program works for every type of input.
TypeWhat it isAccepted?Mark 0 to 100
NormalShould be accepted without causing errorsYes56
BoundaryCorrect type, on the very edge of being validYes0 and 100
InvalidCorrect data type, but should be rejectedNo150
ErroneousWrong data type, should be rejectedNo"ninety"

Boundary data is the lowest and highest values that are allowed. Invalid data is a value outside the range, such as 150.

Test data can be used with any validation check, such as a range check or a length check.

ActivitySort it: which test data?

ActivityPick the test data

Step 4

Test plans and refining

Test it, fix it, test it again.

Run the test plan

A hotel accepts 1 to 5 nights.

Key facts

Test plan = a table that shows each test, the test data and the expected result.
Refining = using the test results to find the error, changing the code, then testing again.
ColumnWhat goes in it
Test dataThe value to test with
Type of test dataNormal, boundary, invalid or erroneous
Expected resultWhat should happen. It is worked out before the test.
Actual resultWhat did happen. Compare it with the expected result.

ActivityComplete the test plan

Step 5

Exam questions

Type your answer, then mark it against the mark scheme.

Step 6

Challenges

Test yourself! Answer 10 questions correctly to finish this step.

Complete

0

Points

0
To finish the step0 / 10
Challenge

Loading…

BuryComputing – Created by Mr R. Brown © 2026
BuryComputing

Testing

Finding errors and choosing test data. OCR J277 2.3.2.

1. Work throughSix short steps, one small part at a time.
2. Check itActivities unlock key-term stickers.
3. End of lessonPress 📝 Get my feedback and paste it into OneNote.


📝 Your feedback

Copy this and paste it into OneNote.