GCSE · Computer Science · Eduqas · Spec C500QS
Explaining test outcomes
Your program just passed its test. High-five? Hold on a second. A test result is evidence, and a good tester knows exactly what it proves and what it does not.
Computer Science · Testing
Be the tester: run the age checker four ways
The rule: accept ages 11 to 16, reject everything else.
This program checks an age against the rule. Pick a test, then call what it prints before the table shows it. Nothing is run: every value here is the lesson’s.
age = input("Enter an age: ")if age >= 11 AND age < 16 thenprint("Accepted")elseprint("Rejected")endif
Variables
Step 1. The tester types in 14. This first step is worked for you.
Work the condition out by hand. Both halves must be true for the if part to run.
Computer Science · Testing
Which way does the outcome go?
A test has been run. Choose a branch at each fork to see where an explanation ends up.
Compare the results → Check the test → Look at the run
4 possible explanations.
Computer Science · Testing
Two ways a program can go wrong
This program should share a bill of 60 and a tip of 12 equally between 4 people, so the test expects it to print 18.0. Press Run, read what happens, then choose a fix for the line that needs changing.
- bill = 60
- tip = 12
- people = 0
- each = bill + tip / people
- print(each)
The messages and outputs are what Python 3.13 gives for this exact code. Other languages word their messages differently.
WHAT YOU'VE LEARNED
A quick recap of today's lesson.
What a test result really tells you, and how to find out why it went wrong.
What you need to know
- A test outcome is the actual result you get when you run a test.
- Start explaining it with one comparison: does the actual result match the expected result, or differ? A difference means something is wrong, and you must say why.
- A match shows the program behaves as required for that test data, so the requirement linked to the test is met for that case.
- A pass shows only that the program works for the data tried. Untested inputs may still give wrong results.
Have a goYour friend’s program passed three tests, all with ages from 20 to 30. They shout, “Zero bugs, ship it!” Does that show it handles an age of -5? Say why.
No. It only shows the program works for the ages that were tried.
A passed test says nothing about inputs that were never tested, so -5 could still go wrong.
- If the results differ, check the test itself before blaming the code: the expected result or the data entered may be wrong.
- A logic error runs to the end but gives the wrong result. A runtime error stops the program while it is running.
Have a goA program prints 7.5 and finishes with no error message, but the test expected 9. Logic error or runtime error?
A logic error.
It ran all the way to the end and gave the wrong result. A runtime error would have stopped the program part-way.
- Normal data is typical, valid input. Its outcome shows whether the program processes the input it expects to receive.
- Boundary data sits at the edges of the allowed range. A wrong result there often points to < used where <= was needed, or the reverse.
Have a goA password may be at most 12 characters. A test with exactly 12 characters is rejected. Is the code more likely to use < 12 or <= 12?
< 12. It should have been <= 12.
Exactly 12 sits on the edge of the allowed range, and a wrong result at an edge often points to < used where <= was needed.
- Erroneous data is invalid input. If it is accepted or crashes the program, validation is missing or incorrect.
- To find the cause, trace the code by hand with the test data and spot the line where values first differ from what was intended.
The big picture
A test outcome is the actual result of running a test. Compare it with the expected result: a match shows the requirement is met for that data only, and a difference means something is wrong. Check the test itself, then name the cause, such as a logic error or a runtime error, and trace the code by hand to find where it starts.
Key points
Worked example
Problem
A shop program should give a discount to anyone aged 65 or over. A boundary test uses the age 65. The test plan expects the message Discount, and the program prints Discount. Explain this test outcome.
⚠ Watch out
Treating a pass as proof there are no errors, and treating every unexpected result as a code mistake. A pass shows only that the program works for the data tried. A mismatch means checking the test itself before blaming the code.
Memory hook
ACT: Actual versus expected, Check the test, Trace the code.
Check yourself
A boundary test expects Accepted but the program prints Rejected, and the test turns out to be set up correctly. In two sentences, say what this shows and what you would do next.
Flashcards
(12)What is a test outcome?
What is the first step in explaining a test outcome?
What does a match between actual and expected result show?
Why does a passed test not prove a program is error-free?
A test result differs from the expected result. What must your explanation do?
What is a logic error?
What is a runtime error?
What should you check before blaming the code?
What does a normal data test show?
What does a boundary data test show?
What does an erroneous data test show?
How do you find the line that causes an unexpected result?
Tap any card to flip it, or use Study as deck to go through them one at a time. In the full lesson these run as a spaced-repetition deck — you rate each card Hard, Good or Easy and the tricky ones keep coming back until they stick.
Learning with Lightbulb is opening soon
You can use this lesson now. Join the waitlist and we'll let you know when the full Lightbulb experience is ready.
Keep me postedMore Eduqas GCSE Computer Science topics
- Comparing approaches to requirements
- Consistent programming style
- Creating and extending Python 3 functions/methods
- Creating and extending Python 3 libraries
- Decomposition
- Designing a testing strategy
- File handling: open a file
- File handling: read into a variable
- File handling: read into an array
- File handling: write to a file
- Iteration: condition and counter controlled loops
- Lists, tuples and dictionaries
How this lesson was checked. This Eduqas GCSE Computer Science (specification C500QS)lesson was published through Lightbulb Learning's human-designed editorial process — the educational standards, accuracy rules and publication checks it must pass were authored and approved by Philip Halpin. It passed subject-specific assessment, automated educational checks and technical publication verification before going live (publication checks completed 16 November 2026). Published pages are monitored, human spot-checking is ongoing across the lesson library, and anything found wrong is corrected or withdrawn. How our lessons are made and checked. Spotted a mistake? Email hello@lightbulblearning.co and we'll review it.