Professional Documents
Culture Documents
Class Testing
Class Testing
Why?
tested
Want to test operations and state transitions in
many combinations
Objects maintain state. “State” affects the
meaning of operations.
of a class
Each transition represents a requirement for one
or more test cases
transition
If the transition is guarded, select boundary
constraint-based coverage
code-based coverage
precondition(op1), etc.
Then execute test cases for operation
Collection classes
Collaborator classes
Sampling
COTS testing
Patterns
Testing exceptions
associated
Impact may be
“no change”
aggregation
composition
by a pointer or a reference
Collaborating class
Class with more extensive interactions
Specification
refers to other objects
those objects
is used or modified,
that class is a collaborating class.
as good as we can do
A sample is a subset of a population (e.g. all
possible test cases) that has been selected based
on some probability distribution
of the architecture
Divide a population of tests into subsets so that
LeftWall RightWall
parameters
53 January 27, 2002 ECEN5033 University of Colorado -- C
Impact of inheritance hierarchy on s.t.d.’s
Each member of the family may have different states that can
cause two objects from the same class to behave differently.
In the example, Puck and Wall have interesting differences in
their states.
In families of classes, the state transition tables are related
along the lines of the inheritance hierarchy.
as we look down the inheritance hierarchy, there will be
level
That is, can see the direct results of the tests