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

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


On Mon, Sep 29, 2008 at 1:34 PM, Tim Ottinger <tottinge at gmail.com> wrote:
>> ... then becomes TDD (test driven development)
>> for me.
>>
> Once you decide that you're going to write the tests anyway, why _not_
> write them first?

What TDD means to me is more or less test-first but I avoided saying
TFD because the "first" tests I do are usually manual, not automated.
I.E. perhaps load the browser and *see* the interface fail to get an
idea of what I should see instead.  It's just easier on my brain.
Tests -- functional tests -- are often detached from the end-user
interface; they are simulations of that interface.  It's easier for me
to simulate a scenario that I've experienced rather than one I can
only imagine.  However, when writing a library where the interface is
actual code then it's easier on the brain to write a test for that
first.  Doctests are also great for this reason.  YMMV.



More information about the testing-in-python mailing list