Testability has two key facets: controlability and observability. To test a component, you must be able to controlits input (and internal state) and observe its output.
If you cannot control the input, you cannot be sure what has caused a given output. If you cannot observe the output of a component under test, you cannot be sure how a given input has been processed [1].
[1] Binder, R. V. (1994). Design for Testability in Object-Oriented systems (Vol. 37). New York, NY, USA: ACM.
Advertisement