Make sure it's easy and quick to write tests. Then write a lot of them.
I found it very difficult to predict in advance which tests will be the ones that will ultimately fail either now, or the long way down the line. I usually take a diffuser approach, trying to hit the corner cases if I can think of them.
Also, don't be afraid to write great tests that test a bunch of things together. Of course, if this test fails, it may take longer to figure out what went wrong, but often problems only occur after you start gluing things together.
Chris Jefferson Oct 12 '08 at 19:39 2008-10-12 19:39
source share