Summary: © 1997 SIGS PUBLICATIONS, INC. 1
Design-for-Testability for Object-Oriented Software1
Jeffery E. Payne, Roger T. Alexander, Charles D. Hutchinson
There are many reasons why object-oriented (OO) design and development has become the norm for
software creation. Two primary reasons are the positive impacts that abstraction/inheritance and
information hiding have on the development process. There is little debate that data abstraction coupled
with inheritance provides a powerful software design mechanism. Likewise, hiding data and internal
operations behind a public interface encourages development of clean, self-contained software components.
Both techniques facilitate software reuse, which many experts feel will result in significant software
productivity gains as OO design technology matures.
As much as inheritance and information hiding aid software design, they have disturbingly negative
consequences on testing. Studies have shown that information hiding and abstraction can actually decrease
the testability of software written in an object-oriented language . Likewise, our experience is that
inheritance can significantly complicate the testing of objects. As the effort to test a system represents a
significant part of the overall development cost, these studies and experiences raise questions about the true
benefit of object-oriented development and the testability that OO systems actually have.
1.1 Software Testability
There are many definitions of testability. The most common is the ease of performing testing . This
definition has its roots in hardware testing and is usually defined in terms of observability and