Why Test?

The fact of the matter is, we could spend all of our time writing tests, and never get any production code done. The only way to know how much to test is by knowing why it has value, because then it is possible to do it enough to get the benefits without overdoing it. Of course, often the opposite is the case, where we choose not to test at all, and this, too, can be remedied by understanding the value of having tests.

Here are a few ideas on what value testing brings:

So the goal is to test to the degree that gives us the most of each of the benefits above without losing the obvious value of delivering software. How to balance this becomes clearer if we focus on test a little, code a little, in constant cycles. This cadence helps us to know when we've strayed to far from having tests or implementing code.

Let me make my first assertion...

Copyright (c) 2001 by Nathaniel Talbott. All Rights Reserved.