Understanding testability

When examining existing implementations, it is easy to see that adding tests to a program later on can be difficult — if the internal structure of the program is complex, you will not have the necessary access to data, methods, and the event handling system (when asynchronous interfaces are used).

Software Engineering – A Practitioner's Approach (Pressman) defines the following principles, which make software more testable: