Testing related classes
With OO programs, it is not sufficient to simply test an individual class for completeness and robustness, though these are good starting points. Completeness entails not only following the canonical class form but also ensuring that data members have a safe means for access using appropriate access methods (labeled as const
when not modifying the instance). Completeness also verifies that the required interface as specified by the OO design has been implemented.
Robustness leads us to verify that all of the aforementioned methods had been tested within an appropriate driver, evaluated for platform independence, and verified that each means for instantiation leads to a fully constructed object. We can augment this type of testing with threshold testing of data members, for instance, noting when exceptions are thrown. Completeness and robustness, though seemingly comprehensive, are actually the most straightforward means for OO component testing.
The more...