Code correctness, and testing strategies

Ben Finney bignose+hates-spam at benfinney.id.au
Sat May 24 21:42:48 EDT 2008


"D'Arcy J.M. Cain" <darcy at druid.net> writes:

> On Sat, 24 May 2008 17:51:23 +0200
> David <wizzardx at gmail.com> wrote:
> > If I did start doing some kind of TDD, it would be more of the
> > 'smoke test' variety. Call all of the functions with various
> > parameters, test some common scenarios, all the 'low hanging
> > fruit'. But don't spend a lot of time trying to test all possible
> > scenarios and corner cases, 100% coverage, etc, unless I have
> > enough time for it.
> 
> Penny wise, pound foolish. Spend the time now or spend the time
> later after your client complains.

Worse, if you don't spend the time now, you'll end up spending the
time later *plus* all the time to find the bug in the first place, all
the time to tease its behaviour out from all the interdependent code,
all the time to go through more rounds of QA, etc. With BDD, only the
time to code the test is spent, so you save all that other time.

-- 
 \           "Laugh and the world laughs with you; snore and you sleep |
  `\                                             alone."  -- Anonymous |
_o__)                                                                  |
Ben Finney



More information about the Python-list mailing list