QW2000 Paper 2T1
Mr. Michael Silverstein
Automating Testing of Object-Oriented Components Using Intelligent Test Artifacts
BACK TO QW2000 PROGRAM
- Common patterns of component/object test automation
- How intelligent test artifacts as an architectural foundation can address common patterns of component/object testing,
speeding test development and reducing test maintenance
- Implementing intelligent test artifacts in Java
testing is the act of subdividing an object-oriented software system into units
of particular granularity, applying stimuli to the component’s interface and
validating the correct responses to those stimuli, in the form of either a state
change or reaction in the component, or elsewhere in the system.
the last few years, design patterns have become a currency for communicating
common problems and their solutions within a context. Testing is no exception.
Several publications have endeavored to document common design solutions to
component test automation problems in terms of design patterns.
article presents a set of design patterns commonly encountered when creating
automated test frameworks and application domain specific test cases, and
introduces the notion of test
artifacts as an abstract test component implementation model.
most types of component testing, the component test developer must eventually
find answers to one or more of the following questions, and possibly the
questions that their answers pose:
do I create a specifically configured instance of a component under test?
to I manage the application of a stimulus to the component under test?
do I organize stimuli into reusable groups?
to I validate the state of the component and system under test after one or
do I manage reference objects?
do I compare references objects to target objects, so that just the
states that are important are compared?
do I intelligently traverse the state of my object under test
do I manage variations on test inputs in order to drive different paths with
the same test stimuli?
do I verify that expected exceptions are raised?
do I map development activities to the tests that validate their
presentation describes several patterns for automated component test framework
and test case design, some familiar and some not, and introduces the notion of test
artifacts as a component architecture for implementing tests. Examples
use the Javaä programming language. These patterns include:
Component - Implement a reusable component model to represent
aspects of automated testing.
Sequence - Present a complete or commonly implemented subset of a test as a
discrete, reusable unit.
Instance - Provide an instance of
an object configured to a particular state
Stimulus - Encapsulate a stimulus/response validation operation for a
component under test for singly or multiply threaded systems.
Validation - Assert that a
component is in the expected state. Define this assertion as a reusable
- Impression - Express a particular view of the state of a component in a
compact, but human readable form
State - Provide a mechanism for specifying and traversing a chain of
object references to extract a specific state
State - Represent the state of a
component in terms of an aggregate set or subset of the states of its
Variation - Organize configured
About the Author
Silverstein is Lead Architect at SilverMark, Inc. (www.silvermark.com)
with responsibility for technical direction for SilverMark's Test Mentor™ line
of object-oriented automated testing tools for Java and Smalltalk. Michael
frequently advises customers on how to design automated tests, and has been
developing software for twenty years, the last eight of which using
object-oriented architectures and languages, including Smalltalk and Java™.
Before SilverMark, Michael worked on a variety of software development projects
at IBM, including the VisualAge development team. Michael can be reached at email@example.com
(919) 858-8300 x29
BACK TO QW2000 PROGRAM