Testing, Debugging and Refinement
Designing test data, locating syntax, runtime and logic faults, and refining code against evidence and requirements.
How to study for GCSE Computer Science
Move repeatedly between problem, algorithm, trace, code, test evidence and system explanation; use the exact language and assessment format required by your current board.
Core concepts
Concept 1
A test plan links normal, boundary, invalid and exceptional inputs to expected results and requirements.
Exam cue: Write the expected result before observing the actual result.
Concept 2
Syntax errors violate language rules, runtime errors arise during execution, and logic errors allow execution but produce unintended behaviour.
Exam cue: Use traces, breakpoints or diagnostics to narrow the fault rather than guessing.
Concept 3
Debugging identifies and isolates a fault; refinement changes the solution and requires regression testing.
Exam cue: After a fix, rerun both the failed test and earlier passing tests.
Risk pitfalls and guardrails
Calling every unexpected output a runtime error.
Guardrail: Do not substitute one board's syntax, protocol list, language version or extension topic for the multi-board core; check the current specification and exam year.
Choosing several test values that exercise the same path.
Guardrail: Do not substitute one board's syntax, protocol list, language version or extension topic for the multi-board core; check the current specification and exam year.
Assuming a corrected line cannot break another feature.
Guardrail: Do not substitute one board's syntax, protocol list, language version or extension topic for the multi-board core; check the current specification and exam year.
Memory anchors
Test plan
A structured set of inputs, expected outcomes and purposes.
Syntax error
Source code that violates the language's grammatical rules.
Runtime error
A failure that occurs while the program executes.
Logic error
Executable code that produces unintended behaviour or results.
Regression test
A repeated test checking that a change has not broken existing behaviour.
Checkpoint rule
Do the check-up only after you can summarize each concept in one sentence and identify one dangerous pitfall from memory.
Knowledge Check (after reading)
Short check-up to confirm understanding of this module.
Check-up Questions
A program cannot be translated because one statement breaks the grammar of the language. What type of error is this?
A program runs to completion but calculates the wrong invoice total. What type of error should the developer investigate?
Answer all questions to submit.
Next step personalized recommendations
Continue learning
Move forward only after this module is stable.
What is Pass Harbor?
Completely free exam prep for 247 UK exams.
- Practice questions
- Flashcards
- Study guides
- Mock exams
- No registration
- No paywall
- Start instantly
“No more expensive exam prep. Quality study tools should be accessible to everyone.”
