[TIP] Test Driven Development
jim at zope.com
Wed Mar 7 01:16:00 PST 2007
On Mar 3, 2007, at 11:46 AM, Michael Foord wrote:
> Hello all,
> I'm very pleased to see this mailing list, thanks to Titus for setting
> it up.
> I'm interested in how many people on this list are doing test driven
> development ?
We do. :)
We also are documentation driven. Our tests fall into 2 categories:
- Edge cases and regressions
When we understand a problem (sometimes after some prototyping
without tests), we write doctests that tell the main stories about
what we are developing. When we do this well, we describe how a user
(API user or end user, as the case may be) uses the things we're
building to achieve something. We write doctests containing
documentation with examples. We document a little, implement a
little, document a little, implements a little, and so on. We find
that documenting as we go, especially documenting from the user's
point of view, makes our interfaces (API and user) much better.
Sometimes, even during initial development, we also need to test edge
cases that are best left out of the main stories. We have Python
test modules that both define these edge case tests, and later,
regression tests, and that register and set up our text-file doctest.
Jim Fulton mailto:jim at zope.com Python Powered!
CTO (540) 361-1714 http://www.python.org
Zope Corporation http://www.zope.com http://www.zope.org
More information about the testing-in-python