Test driven programming, was Re: VB to Python migration

Magnus Lycka lycka at carmen.se
Wed Feb 1 05:51:13 EST 2006


Josh wrote:
> As for the testing, that's something we'll need to learn about. I've 
> read some articles about test driven programming in relation to extreme 
> programming. Can you give me links to any good sites explaining how this 
> all works? (Off list may be better for these off-topic links)

I think this might be interesting to more people...

There is some stuff from my Europython presentation in 2004 here:
http://www.thinkware.se/epc2004test/
The pdf and the "log" from a test-first-session might be of interest.
The pdf contains a number of relevant links.

You might also want to look at the TextTest testing framework, which
has been developed here at Carmen Systems. http://texttest.carmen.se/

With tools like the unittest module, you have to write and maintain
a lot of low level tests. With TextTest you have to write your
application so that it can produce textual output in a repeatable
way. TextTest will basically store all the output from a test run,
and compare that to subsequent test runs.

While unittest is more intended for low level tests written by the
programmer so that he can verify that his program does what he
intended, TextTest is more useful as a regression testing tool or
for acceptance tests, to verify that a software system behaves as
it is required to do. Their applicability overlaps though, and
depending on your type of application, your own preferences etc,
you might use either approach or a combination. At Carmen, we
mainly use TextTest.

Other interesting testing frameworks are Fit, http://fit.c2.com/
and FitNesse http://www.fitnesse.org/ but I have no hands-on
experience with them. For Python code, use PyFit, see e.g.
http://agiletesting.blogspot.com/2004/11/writing-fitnesse-tests-in-python.html



More information about the Python-list mailing list