When is unit-testing bad? [was: Re: does lack of type...]

Cameron Laird claird at lairds.com
Tue Jul 1 23:57:30 CEST 2003


In article <87of0pno5s.fsf at titan.staselog.com>,
Edvard Majakari  <edvard+web at majakari.net> wrote:
>
>I'm rather interested in (and fond of) unit testing as well as TDD, so I
>though to share my opinions. I once discussed TDD with my friend in here,
>and the common agreement seemed to be that TDD is not a silver bullet -
>often there are types of computational modules that are very hard to unit
>test, eg. think of graphical user interfaces or complex systems, where
>forking or threading is concerned. 
			.
			.
			.
While we're all being rational enough to look at bundles of
costs and benefits, this observation hints at a different
insight:  that it's possible to *design* for testability.

Yes, GUIs and forking and threading are hard to test.  SO
DON'T DO THEM.  Or, as I prefer, adopt models of GUI and
concurrency development that lend themselves to testing.

At this point, I should explain what I mean by that.  I
haven't yet figured out how to say it in less than a book;
therefore, all I can contribute for today are the slogans
above.

If you're in a situation where unit-testing is bad, you're
probably in a bad situation.  Change your situation.
-- 

Cameron Laird <Cameron at Lairds.com>
Business:  http://www.Phaseit.net
Personal:  http://phaseit.net/claird/home.html




More information about the Python-list mailing list