Thursday, May 05, 2005

Unit Tests

I'm a "test early, test often" sort of person, so unit tests seem natural to me. This leaves me constantly amazed when I find people who write unit tests to fulfill the letter, but not the spirit. I'm referring to unit tests that fail to test anything significant; or anything at all.
Yes, I have seen (more than one) example of (supposed) unit tests that cannot fail – no assertion – or in the extreme no test code at all. The latter, admittedly was an automatically generated test skelton, but it was commited to the source code repository and remained unchanged for months; it may even still be there, for all I know.

0 Comments:

Post a Comment

<< Home