[TIP] testing: why bother?

Michael Foord michael at voidspace.org.uk
Wed Mar 23 08:16:38 PDT 2011


On 23/03/2011 13:06, Alfredo Deza wrote:
> Hi list,
>
> I am about to give a presentation about testing in a couple of days 
> and the audience is in its majority a
> "we do not write tests" one :(
>
> If you had to name the single most important reason why you need to 
> write tests (or keep up with them) what
> would that reason be?
>
> You can reply with multiple ones, but I am interested in the one you 
> think is *the* mot important one.
>
> One thing to consider though is to think about the problem from their 
> perspective: "Why do I need to write tests?"
> I want to make a dent in that crippled thinking!
>
> I also posted the question in Convore but not everybody is in there, 
> plus I know that I get the best quality
> testing-related answers here :)
>
> Any feedback is *greatly* appreciated!

Hey Alfredo,

TDD isn't really that hard. It does require, impose, a change in 
thinking (which is why Titus is so suspicious) but the actual process is 
simple enough.

The "Advantages" section of Jonathan Hartley's excellent presentation on 
TDD provide some good pithy reasons to test (particularly but not solely 
reasons to do TDD):

? Instant feedback if changes break old code.
? Eliminates the need for project integration test phases -- development 
is sustainable.
? Assurance that new code really works.
? Enables massive, painless refactoring.
? Product code has better external interfaces, and better internal design.
? Breaks down large, daunting tasks into controlled, well-understood steps.
? Passing acceptance tests means provably conforming to an unambiguous, 
predefined spec.
? Tests form up-to-date and unambiguous docs of product code's abilities 
and intended usage.

http://tartley.com/wp-content/uploads/2008/03/tddbrookssilverbullet.pdf

There's also this section:

Brooks' Silver Bullet?
? Tests allow objective measurement of whether code changes are an 
improvement or not.
? Brooks stated there would be 'no silver bullet' to the problems of 
complexity inherent to software and the development process.
? Without such measurement, in a system of sufficient complexity, we are 
just guessing that
each change is an overall improvement.
? With objective measurement, we can eliminate bad changes, creating a 
ratchet to ensure that
changes always act to improve our product.

All the best,

Michael Foord

>
>
> -Alfredo
>
>
> _______________________________________________
> testing-in-python mailing list
> testing-in-python at lists.idyll.org
> http://lists.idyll.org/listinfo/testing-in-python


-- 
http://www.voidspace.org.uk/

May you do good and not evil
May you find forgiveness for yourself and forgive others
May you share freely, never taking more than you give.
-- the sqlite blessing http://www.sqlite.org/different.html

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20110323/78cbd433/attachment.htm>


More information about the testing-in-python mailing list