Testing is used to find and fix errors (bugs) in a program before it is released. A well-tested program produces correct output for all inputs, including unexpected ones. No testing = undetected bugs = unreliable software.
| Type | Definition | Who does it? |
|---|---|---|
| Iterative testing | Testing carried out during development — testing each module/component as it is written | Developer |
| Final (terminal) testing | Testing carried out at the end of development once the complete program is built | Developer / Client |
| Alpha testing | In-house testing by the development team / company before public release | Developer team |
| Beta testing | Testing by a limited group of real users (outside the company) before public release | Real users (testers) |
When writing a test plan, OCR J277 expects you to use three categories of test data:
| Category | Description | Example (age, 0–120) |
|---|---|---|
| Normal | Valid data the program should accept and process correctly | 25, 50, 100 |
| Boundary | Data at the very edge of the valid range (just inside, on, and just outside) | 0, 1, 119, 120, -1, 121 |
| Erroneous | Invalid data that should be rejected — wrong type, completely out of range | -10, 200, "abc", "" |
Program: accepts an age between 0 and 120 (inclusive).
| Test | Category | Input | Expected Output | Actual Output | Pass/Fail |
|---|---|---|---|---|---|
| 1 | Normal | 25 | "Age accepted" | "Age accepted" | ✅ Pass |
| 2 | Normal | 75 | "Age accepted" | "Age accepted" | ✅ Pass |
| 3 | Boundary | 0 | "Age accepted" | "Age accepted" | ✅ Pass |
| 4 | Boundary | 120 | "Age accepted" | "Age accepted" | ✅ Pass |
| 5 | Boundary | -1 | Error message | Error message | ✅ Pass |
| 6 | Boundary | 121 | Error message | Error message | ✅ Pass |
| 7 | Erroneous | "hello" | Error message | Error message | ✅ Pass |
| 8 | Erroneous | 500 | Error message | Error message | ✅ Pass |
| Error Type | Description | Example |
|---|---|---|
| Syntax error | Code breaks the rules of the programming language — program cannot run | PINT "Hello" (missing 'R' in PRINT) |
| Logic error | Program runs but produces incorrect output — algorithm is wrong | Using + instead of - in a formula |
| Runtime error | Error that occurs while the program is running — causes a crash | Division by zero; index out of bounds |
8 questions · 24 marks
| Term | Definition |
|---|
10 questions · 10 marks · 10 minutes