PSP, XP, TDD and other methodologies for solitary programmers

Brad Clements bkc at Murkworks.com
Thu Jan 2 21:46:50 CET 2003


_
"Terry Reedy" <tjreedy at udel.edu> wrote in message
news:aJWcnRWzQtc7E4mjXTWcqA at comcast.com...

> For those who missed the reference in a recent thread, there is an
> online PDF prepublication version of Kent Beck's new book Test-Driven
> Develoopment By Example:
>
> http://groups.yahoo.com/group/testdrivendevelopment/files/TDD17Jul2002
> .pdf
>

This is where I learned the most about TDD. And, I've implemented unittests,
but as I said in my previous post, I'm looking for test patterns suiteable
for database backed "objects".

The .pdf referenced above does have some patterns, but I'm looking for more
ideas on database testing.. In my previous post I mentioned the "mock
object" I used to capture SQL statements.. But that still doesn't test the
db dump/load aspect of my objects.

I guess there's no getting around actually looking at the database after
storing an object..

I'll probably use temporary tables and set them up in the fixture.

Speaking of TestCase, I though that setUp would be called only once for all
test* included in the class, but I find that setUp() is called for ever test
case in the same class.

What I want is one instance of the TestCase to be created (hence, one call
to setUp()), then each test* case to be run in that TestCase instance.

I guess I'll need to make up something to do it that way, since setting up a
temporary database table for every test in my suite will be expensive.








-----------== Posted via Newsfeed.Com - Uncensored Usenet News ==----------
   http://www.newsfeed.com       The #1 Newsgroup Service in the World!
-----= Over 100,000 Newsgroups - Unlimited Fast Downloads - 19 Servers =-----




More information about the Python-list mailing list