[TIP] testing: why bother?

Michael Foord michael at voidspace.org.uk
Wed Mar 23 07:04:34 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!

I'm with Jonathan that TDD is the best way to test. For me TDD is far 
more about a design process, and thinking about code, than it is about 
ending up with tests. That's a *very* nice side-effect though.

The main reason having tests is nice is for when you have to *change 
something*. Making changes to code and then not knowing whether you've 
broken anything is a horrible experience. Attempting a big refactoring 
with no way of really knowing when you're done (when all your tests pass 
again) - or even *what* you've done - is a scary thing. Having a good 
test suite doesn't make refactoring painless, but boy not for anything 
would I go back to the days of refactoring without tests....

All the best,


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


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/b846bc20/attachment-0001.htm>

More information about the testing-in-python mailing list