[prog] Unit testing
Jimen Ching
jching at flex.com
Thu Sep 2 15:32:05 EST 2004
On Thu, 2 Sep 2004, Almut Behrens wrote:
>So, my short answer is: document unit tests (almost) as well as any
>other code, and try to avoid 'slapping things together'.
No offense, but in the real world, this is a luxury. You know that right?
We all agree that unit testing can, and should, reduce your defects, and
thus your development time. But what ends up happening is not that you've
introduced lots of bugs, but because the requirements keep changing, so
you end up 'slapping things together' anyway.
Also, unit testing isn't as easy as most people think it is. In some
cases, the unit test ends up more complex than the code it is testing.
My experience suggests that one should try to make unit tests as clean as
the code being tested. But if you spend as much time debugging your test
code as you do your deliverables, then it's time to throw one or the other
away...
--jc
--
Jimen Ching (WH6BRR) jching at flex.com wh6brr at uhm.ampr.org
More information about the Programming
mailing list