[TIP] testing: why bother?

C. Titus Brown ctb at msu.edu
Wed Mar 23 06:28:35 PDT 2011


On Wed, Mar 23, 2011 at 09:06:44AM -0400, Alfredo Deza wrote:
> 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 find it helps prevent me from making the same mistake twice.  The phrase I
use is "stupidity driven testing" -- I wait until I do something stupid, then
write a test to avoid doing it again.

This works very well in scientific and Web programming, where you can eliminate
whole swaths of "common" errors fairly quickly as soon as you hit them the
first time.

--titus
-- 
C. Titus Brown, ctb at msu.edu



More information about the testing-in-python mailing list