cuted as responses (to the stimuli). In his automatic
test method, a spanning tree was first derived from
a FSM in software design specification, and then test
sequences were generated based on the spanning tree
to detect state and transition errors.
Although there are a number of recent research papers
addressing object-oriented testing issues, only a
few of them address state testing issues in 00 programs[
2][7]. A statebased testing approach was discussed
in [2] for 00 programs using a finite state machine.
Although a finite state machine (FSM) has
been used as a test model for conventional software
state testing [l][lO], it has the difficulty of representing:
1) the inherited statedependent behavior, 2) the
concurrent dynamic behavior, and 3) object states(or
sub-states) and their transitions in terms of data members(
values) and function members of class objects. In
[7], we addressed the importance of object state testing
and relating problems by using a vending machine
example to show how effective object state testing can
be used to find object state errors in 00 programs. A
test model for class objects (called object state diagram)
is informally presented, and a simple test generation
approach is outlined using an reverse engineering
approach. In addition, a basic idea and its detailed
procedure is provided to extract the OSD test model
from source code.
In this paper, we formally present the object state
test model, called an object state diagram (OSD).
Based on the new test model, we discuss various errors
in object state testing, test strategies and test criteria,
and test generation methods. Our OSD model is influenced
by the existing object models [3][4][8], and is designed
as a test model for object state testing, instead
of an analysis/design model. The notion of the OSD
model is directly associated with specific programming
concepts instead of application domain modeling concepts.
The major extensions of this model are: 1)
it supports the encapsulated object state hierarchy as
well as the inherited state hierarchy for a complex class
object, 2) it represents object-oriented states instead
of function-oriented states, 3) it provides a direct mapping
between the abstract behavior model and its corresponding
program. Based on the OSD model, object
statedependent errors are described, the test proce
dure, test criteria and strategies are discussed.
3 Object State Test Model
The object state digram (OSD) is designed as a test
model for testing dynamic behavior of objects. Object
state diagrams can be classified into two types:
1) atomic object state diagram(AOSD), and 2) composite
object state diagram(C0SD). An AOSD repre-