Menu

A test plan is prepared before any testing begins. It records every check you intend to make, which helps you cover all cases and remember to deal with any fault you uncover.

What each test records

  • a test number, so you can refer to tests and rerun them later
  • the purpose of the test — what it is checking
  • the test data — the actual values that will be entered
  • the type of test data — normal, boundary, invalid or erroneous
  • the expected result — what should happen if the program works correctly

Writing the plan first forces you to think through every case in advance, instead of typing in whatever comes to mind once the program runs.

Expected and actual results

After each test is performed, write the actual result — what happens when the test is run — next to the expected one, then note whether it passed and anything that must be done. If the two results agree, the test has passed. If they do not, the plan identifies the test that failed so you can correct the fault and try again.

For normal and boundary data the expected result is usually that the data is accepted. For invalid and erroneous data the expected result is usually that the program rejects the data and may ask for it to be entered again.

TestPurposeTest dataType of test dataExpected resultActual result
1check a typical bike hire5normalaccepted, charged for 5 hours5 hours charged — pass
2check the longest allowed hire12boundaryaccepted, charged for 12 hours12 hours charged — pass
3check a hire longer than allowed13invalidrejected, asked to re-enter13 hours accepted — fail, fix needed
4check text is rejectedblueerroneousrejected, asked to re-enterrejected — pass

Practise this