Test Data and Test Plans
1. What Is a Test Plan?
A test plan is a document that sets out what will be tested, the data that will be used, and the result that is expected before the test is run. Testing is not guessing: the expected outcome must be decided in advance, otherwise there is nothing to compare the actual outcome against.
2. The Four Types of Test Data
The syllabus limits test data to four types. Getting the definitions exactly right matters, because extreme and boundary data are frequently confused.
| Type | Definition | Should it be accepted? |
|---|---|---|
| Normal | Data a user would typically enter, comfortably inside the valid range | Yes |
| Abnormal | Data the program should refuse — outside the range, or the wrong data type | No — must be rejected |
| Extreme | The largest and smallest acceptable values | Yes |
| Boundary | The largest/smallest acceptable value and the corresponding smallest/largest rejected value — a pair either side of the limit | One accepted, one rejected |
Extreme data: 0 and 100 — both accepted.
Boundary data: 100 and 101 — 100 accepted, 101 rejected. Also 0 and -1 at the lower limit.
3. Worked Example: The Library Age Limit
| Test type | Input data | Expected outcome | Reason |
|---|---|---|---|
| Normal | 12 | Accepted | Well inside the valid range |
| Abnormal | “Ten” | Error message | Wrong data type — string, not integer |
| Abnormal | 25 | Rejected | Correct type but outside the range |
| Extreme | 5 | Accepted | Smallest acceptable value |
| Extreme | 18 | Accepted | Largest acceptable value |
| Boundary | 18 and 19 | 18 accepted, 19 rejected | Tests the upper limit is set at exactly the right place |
| Boundary | 5 and 4 | 5 accepted, 4 rejected | Tests the lower limit |
4. Worked Example: The Discount Code
| Test type | Input data | Expected outcome | Reason |
|---|---|---|---|
| Normal | 25 | Discount applied | Typical valid input |
| Abnormal | -10 | Rejected | Negative values are invalid here |
| Abnormal | “half” | Rejected | Wrong data type |
| Extreme | 1 | Discount applied | Smallest acceptable percentage |
| Extreme | 50 | Discount applied | Largest acceptable percentage |
| Boundary | 50 and 51 | 50 accepted, 51 rejected | Catches a condition written as <= 51 by mistake |
4b. Iterative Testing and Final Testing
Testing happens at two different scales, and the syllabus names both.
- Iterative testing takes place during development. Each module or sub-system is tested as it is written, and the program is corrected and re-tested repeatedly — hence iterative. The point is to find a fault while the code that caused it is small and freshly written.
- Final testing takes place after development, once all the modules are combined. The complete program is tested against the original requirements specification from the analysis stage, to confirm it does everything it was supposed to do.
This is also why final testing refers back to the requirements specification rather than to the code. Iterative testing asks does this module do what I intended? Final testing asks does this program do what the customer asked for? They are different questions, and only the second one can tell you the project succeeded.
5. Choosing Test Data Well
- Cover every type — a plan with only normal data proves almost nothing
- Include both ends of a range, not just the top
- Include a wrong data type as well as an out-of-range value
- State the expected outcome before running the test, not after
- Give a reason for each test, so the plan shows why the data was chosen
6. Exam Focus
Quick self-check
- Define extreme data and boundary data, and state how they differ.
- A password field accepts 8 to 12 characters. Give normal, abnormal, extreme and boundary test data.
- Explain why testing only normal data is insufficient.
- Give two abnormal values for a field that stores a month number, each invalid for a different reason.