During Josh Berkus' presentation at the JPUG PostgreSQL Conference, I was particularly struck by the fact that 8.1 had a shorter beta period than previous releases, rolled out on time, and enjoyed a longer period before the first post-release bug was reported. The PostgreSQL Build Farm played a key role in making these possible. (Thanks again, Andrew!)

Something that has been briefly discussed in the past wrt PostgreSQL has been unit testing to complement the current regression tests. I've taken a very quick google to see what's out there for C unit testing frameworks. The ones I found are:

Check (GPL)
GNU Autounit (GPL)
CuTest (GPL? zlib/libpng?)
CUnit (GPL)

There also appears to be a separate cUnit framework, but the web page was unavailable when I checked.

Of these, Check and GNU Autounit set aside a separate, protected address space for running tests.

(Almost?) all of these frameworks are GPL. I'm assuming this is probably going to be an issue with distribution, presumably a non- starter. I wonder if it would be feasible to maintain the unit testing framework on Pgfoundry, available for those who wish to run the tests? If the unit tests were to be run on the build farm machines, that would mean additional dependencies, but perhaps that can be configured to be relatively painless (and perhaps completely automated).

On a related note, Neil brought up QuickCheck in a blog entry[1], and mentioned in particular "try[ing] to define a domain-specific language that would allow you to construct random SQL queries that satisfy certain high-level constraints, and then verify that the backend executes those queries correctly".

I'm interested in hearing others' thoughts on this. What other

Michael Glaesemann
grzm myrealbox com


[Check](http://check.sourceforge.net/)
[CuTest](http://cutest.sourceforge.net/)
[CUnit](http://cunit.sourceforge.net)
[cUnit](http://people.codefactory.se/~spotty/cunit/)
[GNU Autounit](http://www.recursism.com/s2004/zp/products/gnu+autounit)

[1](http://www.advogato.org/person/nconway/diary.html?start=21)

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply via email to