Skip to main content
EnglandComputer ScienceSyllabus dot point

How are programs tested for correctness, what kinds of error occur, and how are they tracked down?

Testing and correctness: the types of program error (syntax, runtime and logic), test strategies and test data (normal, boundary and erroneous), trace tables and dry runs, and validation and verification of input data.

An Eduqas Component 1 answer on testing and correctness: syntax, runtime and logic errors, choosing normal, boundary and erroneous test data, dry runs with trace tables, and the difference between validation and verification of input.

Generated by Claude Opus 4.813 min answer

Reviewed by: AI editorial process; not yet individually human-reviewed

Have a quick question? Jump to the Q&A page

Jump to a section
  1. What this dot point is asking
  2. The answer
  3. Examples in context
  4. Try this

What this dot point is asking

Eduqas wants you to distinguish the types of error (syntax, runtime, logic), choose appropriate test data (normal, boundary, erroneous), perform a dry run with a trace table, and explain validation and verification of input. Trace-table questions are common and reward careful, row-by-row working.

The answer

The three types of error

Test data and test strategies

Dry runs, trace tables, validation and verification

Examples in context

Every form you fill in online uses validation (a range check on an age, a format check on an email) and often verification (re-enter your email). Trace tables are an exam staple and a real debugging technique when a stepping debugger is not available. The Eduqas project (Component 3) is heavily marked on a thorough test plan with all three data types and evidence of fixing the faults found, so this dot point is as much a project skill as an exam topic. It connects directly to the software development lifecycle in the next module.

Try this

Q1. Classify "dividing by zero while the program runs" as a syntax, runtime or logic error. [1 mark]

  • Cue. A runtime error (it occurs during execution and crashes the program).

Q2. For a field accepting ages 00 to 120120, give one boundary value and one erroneous value. [2 marks]

  • Cue. Boundary: 00 or 120120 (or 121121 just outside). Erroneous: −1-1 or text such as "old".

Q3. State the difference between validation and verification. [2 marks]

  • Cue. Validation checks input is reasonable against rules; verification checks input has been entered or transferred accurately.

Exam-style practice questions

Practice questions written in the style of WJEC Eduqas exam questions on this dot point, with worked answer explainers. The year tag is the paper they imitate, not the source.

Eduqas 20196 marksDistinguish between a syntax error, a runtime error and a logic error, giving an example of each, and explain why a logic error is the hardest to detect.
Show worked answer →

Syntax error (up to 2 marks): a breach of the language's grammar rules, caught by the translator before the program runs, for example a missing closing bracket or misspelled keyword.

Runtime error (up to 2 marks): an error that occurs while the program is running, causing it to crash or stop, for example dividing by zero or accessing an array index that does not exist.

Logic error (up to 1 mark): the program runs without crashing but produces the wrong result, for example using + where * was intended.

Hardest to detect (up to 1 mark): a logic error produces no error message and the program appears to work, so it is only found by testing the output against expected values.

Markers reward a correct definition and example for each, and the reason logic errors are hardest (no crash or message, only wrong output).

Eduqas 20215 marksA program accepts an exam mark that must be between 00 and 100100 inclusive. Give one example each of normal, boundary and erroneous test data, and explain the difference between validation and verification.
Show worked answer →

Test data (up to 3 marks, one each): normal, a typical valid value such as 5757; boundary, a value at the edge of acceptance such as 00 or 100100 (and just outside, such as 101101); erroneous, an invalid value that should be rejected such as −5-5 or the text "abc".

Validation versus verification (up to 2 marks): validation checks that input is reasonable and within allowed rules (a range check rejects 101101); verification checks that input has been entered or transferred accurately (such as a double-entry check or proofreading against the source).

Markers reward a valid example of each test-data category and the rules-versus-accuracy distinction between validation and verification.

Related dot points

Sources & how we know this