Test Automation Design Patterns


The following design patterns for object-oriented test stubs, drivers, and frameworks are presented in Testing Object-Oriented Systems: Models, Patterns, and Tools.

Capability Pattern Name Intent
Built-in Test Percolation (pdf) Perform automatic verification of super/subclass contracts.
Test Cases Test Case/TestSuite Method Implement a test case or a test suite as a method.
Catch All Exceptions Test driver generates and catches IUT's exceptions.
Test Case /Test Suite Class Implement test case or test suite as an object of class TestCase.
Test Control Server Stub Use a stub implementation of a server object for greater control.
Server Proxy Use a proxy implementation of a server object for greater control.
API/Class

Drivers

TestDriver Super Class Use an abstract superclass for all test drivers.
Percolate the Object Under Test Pass the object under test to driver.
Symmetric Driver Driver hierarchy is symmetric to hierarchy of classes under test.
Subclass Driver Driver is a subclass.
Private Access Driver Driver uses encapsulation avoiding features.
Test Control Interface Driver uses interface extension features.
Drone Driver is a mixin.
Built-in Self Test Driver is implemented as part of an application class.
Test Execution Control Command Line Test Bundle Code and build a test executable to be run from a command line or console.
Incremental Testing Framework Test suites are based on a simple framework that supports incremental development.
Fresh Objects Test environment with registration by and interface to built-in test in all application objects.



Home | Contact | Copyright | Site Map
First Release: 1 December 1999. Last Rev: 15 October 2001