SoftwarePractice.org: Home | Courseware | Wiki | Archive

Menu:

Module 8: Testing

Testing is an essential part of any software development process, but it is often poorly understood. In this module, we take a simple approach and look at two key approaches to testing. Unit testing is done at the class level, and is designed with the aid of method pre- and post-conditions. System testing is done at the program level, and is designed based on documented use cases. We look at how your approach to object-oriented design is influenced by the need to design and execute tests, and close with some other issues in testing.

Lecture material

Tutorial

The first exercise in the self-study module can be used in a tutorial class setting. Students learn how to design unit test cases based on a class specification within a contract programming approach.

Self-study module

This module introduces the technique of functional (blackbox) unit testing to verify the correctness of classes. It shows how to design unit test cases based on a class specification within a contract programming approach. The laboratory exercises then guide students through creating and running tester classes in Java from a test case design, utilising the JUnit unit test framework. It also contains a worked example on how to unit test GUI and event handling classes.
  • Testing :: pdf

Resources