Sunday, December 12, 2004

Test Update

2700 Tests running.

Tried unit testing (Brian Merricks Technical Facing tests) again. I still get no satisfaction from them. They are way to geeky. They tell me how it does it, seems redundant to self describing code.

I haven't been able to have them make me code faster. Just get lost in details. Ah well, I'll keep reading about them, maybe I'll meet someone that changes my perspective on them.

Here's what I've been told about unit tests that haven't worked for me:

Defect Triangulation: Unit tests are supposed to help you localize exactly where the problem is in the code. Yeah, but usually the code hasn't been wrong (and hence the unit tests still pass). The problem is I missed something conceptually - so my unit test passes my functional test fails and I'm still in the debugger letting the numbers tell me what I missed conceptually.

Design Quality: By writing unit tests you will get better designed code, because you must break it down into smaller testable pieces. My designs evolve over time - usually when I'm writing code the first time the design sucks because I don't really understand. The unit tests just make that sucky design more of a pain in the ass to change.

Are unit tests only for smarter people who can get it right the first time? What am I missing?


Post a Comment

<< Home