Lecture Notes for CS 325
Testing Object-Oriented Programs, 27 March 2000
- functional testing still applies to objects and methods
- structural testing still applies to methods
- translucent box testing - structural testing for objects.
- testing method and state interaction; not method-only testing
- adt testing provides a framework, but inheritance and a less formal
orientation
- issues
- classes and instances - abstract classes
- object state is difficult to characterize - non-sequential control
flow, global state influences
- inheritance hierarchy
- some of the testable parts aren't in the class
- some of the previously tested components aren't the same
- arbitrary patterns of method invocation
- state-based (translucent box) testing
- characterizing state changes induced by method calls
- invoke every method in every state
- potentially expensive - state may be large
- one invocation per state may not be enough
- reduce the state space using equivalence classes
- re-introduce special cases
- also check the integrity of the data structures making up the state
- testing is fairly standard - test harness, special set and examine
methods, stubbing out called objects
- comments
- testing constructors and destructors is difficult
- testing effort related to state space
- errors not related to state abuse are not detected
- establishing a testing order among objects may be hard - bottom up
- incrementally testing objects
- can the tests in a parent class be reused in a child class
- avoid redundant testing, reduce the number of test cases
- new, old (recursive), and redefined features
- feature interaction between parent and child
- select test cases to tickle inter-feature interaction
- test-case criteria based on inter- and intra feature interaction
patterns
- top-down testing
This page last modified on 27 March 2000.