[TIP] the best time to start doing a test?

Kumar McMillan kumar.mcmillan at gmail.com
Mon Sep 29 11:09:04 PDT 2008


On Mon, Sep 29, 2008 at 12:15 PM, Alfredo Deza <arufuredosan at gmail.com> wrote:
> Right now I am in the middle of writing a web status script that keeps
> getting increasingly more complicated and bulky. Do I have to wait until I
> am satisfied with the script and then start writing tests? or should I start
> writing tests as soon as I start developing?

I'd say you are probably beyond the point at which you should start
writing tests so now is a good time to start.  However, I [personally]
find it important to leave breathing room when beginning a new area of
development in a project -- in other words, I give myself time to
explore the problem in code before writing tests.  I think of this as
a prototype stage and the code might even get thrown away.  Once I
have a vision for the architecture then I start writing tests as soon
as possible and add any new features with accompanying tests.  This is
sort of like the TED (test enhanced development) that Grig and others
described but it's got a bell curve to it where as soon as the
architecture stabilizes it then becomes TDD (test driven development)
for me.

Kumar



More information about the testing-in-python mailing list