How to test?" is a question that cannot be answered in general. "When to test?" however, does have a general answer: as early and as often as possible.
Stroustrup, Bjarne. Programming: Principles and Practice Using C++. Addison-Wesley Professional, 2008.
Sourced by: Quote.org sourced