Re: PostgreSQL unit tests

From: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
To: pgsql-hackers(at)postgresql(dot)org
Cc: Michael Glaesemann <grzm(at)myrealbox(dot)com>
Subject: Re: PostgreSQL unit tests
Date: 2006-02-22 13:33:25
Message-ID: 200602220833.25791.xzilla@users.sourceforge.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wednesday 22 February 2006 01:27, Michael Glaesemann wrote:
> 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
>

You could check into what spikesource has been doing. I believe they mostly
just piggyback off of our regression tests for postgresql core, but there
might still be something that could be built upon. If you look at this url
http://developer.spikesource.com/spikewatch/index.jsp?show=component-results&comp-id=22074
the actual success information isnt terribly exciting but the "code coverage"
url shows something of more interest. There is more stuff if you dig around a
bit.

--
Robert Treat
Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Mark Woodward 2006-02-22 13:55:40 Re: pg_config, pg_service.conf, postgresql.conf ....
Previous Message Andrew Dunstan 2006-02-22 12:44:54 Re: PostgreSQL unit tests