Specifications that use this resource:

Lesson plan: test planning

This is an example of one approach to teaching an approach to planning for tests. It assumes that students have chosen to solve a realistic problem by creating a programmed solution. Investigations may require a different focus.

This sample lesson plan is for a lesson lasting one hour.

Topics

4.13 Systematic approach to problem solving

4.14 The computing practical project

Learning objectives

Be aware that the implementation must be tested for the presence of errors, using selected test data covering normal (typical), boundary and erroneous data. Students should have practical experience of designing and applying test data, normal, boundary and erroneous to the testing of programs so that they are familiar with these test data types and the purpose of testing.

Understand the process of acceptance testing with the intended user(s) of the system to ensure that the intended solution meets its specification and how to document user feedback (not details of the tests carried out by the end user).

Be able to design tests to demonstrate the robustness of the complete, or nearly complete, solution and that the requirements of the solution have been achieved.

Prior knowledge needed

Understanding of a test plan form, eg columns for test ID, description, data or action, expected result, actual result, comment.

Lesson preparation

Appropriate computer facilities to explore implementations.

Sets of cards with descriptions of different test strategies appropriate to students’ projects, for example:

  • Unit testing
  • Integration testing
  • Functional testing
  • System testing
  • Stress testing
  • Performance testing
  • Usability testing
  • Acceptance testing
  • Regression testing
  • Beta testing

Activity

Duration Activity Group size Assessment objective
10 mins Introduce the Shunting Yard algorithm, which turns infix expressions into Reverse Polish Notation (or another algorithm). Whole class Links to understanding of RPN (Topic 4.3.3.1).
15 mins

Design tests and test data for an implementation of the algorithm.

Note that it is possible, and often useful, to design a test plan at an early stage in the development of a project. This aids unit testing during implementation.

Individual or small group Practical experience of designing and applying test data, normal, boundary and erroneous to the testing of programs so that they are familiar with these test data types and the purpose of testing.
10 mins Introduce and discuss the prepared range of test strategies. Give out sets of cards. Whole class
15 mins Sort cards into order of testing, and identify which of the designed tests fall into which strategy. Individual or small group Be able to test for errors and also robustness.
10 mins Discuss the relationship between functional requirements and acceptance testing, and the process of documenting user feedback. Whole class Understand the process of acceptance testing.

Further work and reading

Plenary

Run selected test plans on an implemention in an appropriate language.

Extension

Research the opportunities for automating some or all of the tests, or using stored test data for repeating tests during program development.

Research the concept of revision control and source code management, for example using Github, and consider the implications for teams working together, perhaps from different places.

Visits to or from software developers to observe or discuss test methodology in practice.

Preparation for next lesson

Consider how the test plan will provide evidence for the evaluation stage, when we move from asking ‘does it work?’ to ‘how well does it work, and what could be better?’

Homework

Design or refine the test plan, including acceptance testing, for the student’s project under development.