Edexcel 1CP2 requires you to know three types of programming error:
| Error Type | Description | Example |
|---|---|---|
| Syntax error | Breaks the rules of the programming language. The code cannot run. | PRINT "Hello (missing closing quote) |
| Logic error | Code runs but produces wrong output. The algorithm logic is flawed. | Using < instead of ≤ causing a loop to run once too few |
| Runtime error | Code crashes during execution. Detected by running the program. | Dividing by zero, accessing an index out of bounds |
Testing is used to find and fix errors. Edexcel 1CP2 requires knowledge of three testing approaches:
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.
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.
| Feature | Iterative Testing | Final Testing |
|---|---|---|
| When? | During development, after each module | After full program is written |
| Error location | Easier — fewer new components to check | Harder — whole codebase to search |
| Cost of fixing | Lower — caught early | Higher — major rewrites may be needed |
| Suitable for | Agile/iterative projects | Waterfall/smaller projects |
When testing, you should use three categories of test data:
| Data Type | Description | Example (age input, valid range 0–120) |
|---|---|---|
| Normal | Valid data within expected range | 25 |
| Boundary | Data at the exact edge of valid range (min/max) | 0 and 120 |
| Erroneous | Invalid data — should be rejected by the program | -1, 200, "abc" |
8 Edexcel-style questions · AI-marked
| Term | Definition |
|---|
Timed exam-style test. No feedback until submission.