> Well, that's not really what he's saying... his real objection is that
> unit testing *tools* suck and that developers just don't know how to
> write automated tests.

I agree with that - but do you think it's the developer's fault?  In
the end, I think they must be at least partially accountable, given
that they're the ones writing the tests.  However, I have noticed an
increase in the marketing schpeal for testing tools recently that
promise nirvana - and I can't help but think that IT managers
contribute to the problem by believing them.


> Unit tests are very valuable *if* they are set up correctly but most
> test harnesses are a pain in the @$$ to use and in order to write test
> cases you often end up writing even more code than your original code

My old company wrote unit tests that were very silly.  (It suited
them).  For each "business object" you wrote, you had to check in a
unit test that (at minimum) tested:  getter/setter of each property
(kind of silly in C#, really, because you're testing the language
itself at that point...), and that BO's ability to CRUD itself
(please, don't ask why it could do that.)

Given that the overarching framework was a bear and those were the
minimum test requirements, nobody ever wrote tests against the BO's
ability to perform the logic they were intended to do - which is where
I think unit tests become valuable!

However, I recently had to crank out an application in a very short
timespan - the UI was likely to be decided at the last minute, but the
business requirements were known and well defined from the start.  We
wrote semantical/logical test harnesses (tested business processes,
not getter/setters!), fulfilled them, then glued on the UI to the
resultant model, and had a very successful launch: the UAT team
reported one bug.

I think Unit tests are like many of the other tools we discuss (OO,
design patterns, flash, ruby on rails)...you're as likely to shoot
yourself in the foot as you are to accomplish anything unless you
learn about and think about what you're doing.

-Joe

--
Get Glued!
The Model-Glue ColdFusion Framework
http://www.model-glue.com

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:221541
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to