I know many of us place value on unit tests. But, like most things in life, benefits bring costs along for the ride. It’s a routine exercise in prudence.
I think unit tests can be valuable. I also think they can be very expensive. And it’s very easy for the costs to surpass the benefits if we’re not careful.
I’m especially fond of Gerard Meszaros’ perspective on automated testing. In his presentation, he makes the argument that tests deserve the same level of craftsmanship and care as our production code, and provides some excellent techniques to distill these tests such that they lower the costs associated with writing and maintaining them.