Incremental Testing of Object-Oriented Class Structures
Abstract
Although there is much interest in creating libraries of well-designed, thoroughly-tested classes that can be confidently reused for many applications, few class testing techniques have been developed.In this paper, we present a class testing technique that exploits the hierarchical nature of the inheritance relation to test related groups of classes by reusing the testing information for a parent class to guide the testing of a subclass.We initially test base classes having no parents by designing a test sui~e that tests each member fmction individually and also tests the interactions among member functions.To &sign a test suite for a subclass, our algorithm incrementally up~tes the history of its parent to reject both the modijied, inherited attributes and the subclass's newly akjined attributes.Only those new attributes or @'cted, inherited attributes are tested and the parent class' test suites are reused, if possible, for the testing.Inherited attributes are retested in their new context in a subclass by testing their interactions with the subclass's newly dejined attributes.We have incorporated a data jlow tester into Free Software Founalzion, Inc's C-++ compilers and are using it for our experimentation.