📁 Paper 1 · Topic 1: Computational Thinking
1.2g Testing Strategies & Types of Error
Edexcel 1CP2 · GCSE Computer Science · ~13 min read · 🔒 Pro
Notes
──
Video
──
Slides
──
Worksheet
──
Quiz

Types of Error in Programs

Edexcel 1CP2 requires you to know three types of programming error:

Error TypeDescriptionExample
Syntax errorBreaks the rules of the programming language. The code cannot run.PRINT "Hello (missing closing quote)
Logic errorCode runs but produces wrong output. The algorithm logic is flawed.Using < instead of causing a loop to run once too few
Runtime errorCode crashes during execution. Detected by running the program.Dividing by zero, accessing an index out of bounds

Testing Strategies

Testing is used to find and fix errors. Edexcel 1CP2 requires knowledge of three testing approaches:

1. Iterative Testing

Testing is done during development, after each small module or section is written. Errors are found and fixed immediately, before the next section is built. This approach is part of agile/iterative development models.

2. Final/Terminal Testing

Testing takes place after the complete program is written. The whole system is tested at once. Also called "big bang" testing. Errors may be harder to locate as many components have been written.

3. Comparison

FeatureIterative TestingFinal Testing
When?During development, after each moduleAfter full program is written
Error locationEasier — fewer new components to checkHarder — whole codebase to search
Cost of fixingLower — caught earlyHigher — major rewrites may be needed
Suitable forAgile/iterative projectsWaterfall/smaller projects

Types of Test Data

When testing, you should use three categories of test data:

Data TypeDescriptionExample (age input, valid range 0–120)
NormalValid data within expected range25
BoundaryData at the exact edge of valid range (min/max)0 and 120
ErroneousInvalid data — should be rejected by the program-1, 200, "abc"
Exam tip: When asked to select test data, always give examples of all three types — normal, boundary, and erroneous. For boundary, state both the lower and upper boundary values. For erroneous, include both out-of-range numbers AND wrong data types (e.g., text where a number is expected).
⚠️ Common Mistakes
  • Confusing syntax errors (won't run) with logic errors (runs but wrong output)
  • Forgetting runtime errors exist as a third category
  • Only giving one boundary value — always give both (lower AND upper)
  • Not including erroneous data of the wrong type (e.g. letters for a numeric input)
Video coming soon
In production

Key points

  • Three error types: syntax, logic, runtime — differences and examples
  • Iterative vs final testing: when each is used
  • Normal, boundary, erroneous test data with examples
  • Why boundary testing catches off-by-one errors
  • Exam technique for test data questions
Click slide or press arrow keys to navigate
✍️

Worksheet — 1.2g Testing & Error Types

8 Edexcel-style questions · AI-marked

Q1State the three types of programming error.[3]
✅ Mark scheme
Syntax error [1], logic error [1], runtime error [1].
Q2Explain the difference between a syntax error and a logic error.[2]
✅ Mark scheme
A syntax error breaks the rules of the language and prevents the program from running [1]; a logic error allows the program to run but produces incorrect output [1].
Q3Give one example of a runtime error.[1]
✅ Mark scheme
Any 1: Division by zero [1] / accessing an array index that doesn't exist [1] / stack overflow from infinite recursion [1].
Q4Describe what is meant by iterative testing.[2]
✅ Mark scheme
Testing carried out during development [1] after each module or section is completed, so errors can be found and fixed before the next part is built [1].
Q5Give one advantage of iterative testing over final (terminal) testing.[1]
✅ Mark scheme
Any 1: Errors are caught early / fewer components to search when an error is found / cheaper to fix errors / less rework needed [1].
Q6A program accepts a number between 1 and 100 inclusive. State one piece of each type of test data: normal, boundary, erroneous.[3]
✅ Mark scheme
Normal: any value between 2 and 99, e.g. 50 [1]; Boundary: 1 or 100 [1]; Erroneous: 0, 101, or non-numeric (e.g. "abc") [1].
Q7Explain why boundary data is important when testing programs.[2]
✅ Mark scheme
Boundary data tests values at the exact edge of the valid range [1]; programs often have off-by-one errors where boundary values are processed incorrectly, making them a common point of failure [1].
Q8A student writes a calculator program. When they type letters instead of numbers, the program crashes. What type of error is this, and which type of test data would have revealed it?[3]
✅ Mark scheme
This is a runtime error [1] (the program crashes during execution); it would be revealed by erroneous test data [1] — specifically data of the wrong type (letters/strings instead of numbers) [1].
Topic Quiz
Q 1 of 15
You scored
out of 15
⚡ XP
Click to reveal definition
🎉
Session complete!
TermDefinition
🎯

Mini Test — Testing & Error Types

Timed exam-style test. No feedback until submission.

  • 10 questions · 10 marks · 10 minutes
← 1.2f Trace TablesTopic 1Next: 1.2h Complexity →
🔒

Unlock Pro

Subscribe to access all 59 Edexcel 1CP2 lessons.

£7.99/month
or £59/year
Subscribe →