Testing a program means giving it some example inputs to make sure that there are no logic errors.
A test plan should outline exactly what will be tested.
The test data from your test plan should cover all three categories of data:
Table 1 shows an example test plan for a program which should accept a four-digit numeric input.
Table 1
| Type | Input | Expected output |
|---|---|---|
| Normal | 1234 |
Valid. |
| Boundary | 0000 |
Valid. |
| Boundary | 9999 |
Valid. |
| Boundary | 10000 |
Reject: too long |
| Boundary | 999 |
Reject: too short |
| Erroneous | 12ab |
Reject: not numeric |
Trace tables can help you pin-point exactly what went wrong if the actual output doesn't match the expected output.
Why is it important to test programs?
Many issues arise if your software doesn't work, including:
• Competition with other software providers
• Reputational damage
• Legal obligations
• Safety