Thread: How to test Perl front end to PostgreSQL DB?

How to test Perl front end to PostgreSQL DB?

From
Date:



I have a collection of Perl modules that are meant to serve as a
front-end/wrapper for a PostgreSQL database.  I want to be able to
test the functionality of these modules, but I don't want the tests to
depend on any of the specific data that is currently stored in the
database.

The ideal scenario would be to have a dummy database that is identical
in every respect to the real database, except that it has only a small
amount of data that is put into it by the testing software.

I imagine that this is a common enough need that there may be some
already standard ways of solving it.  If so, any pointers to these
standard solutions, or any other bit advice on this problem, would be
much appreciated.

Thanks!

kj


Re: How to test Perl front end to PostgreSQL DB?

From
Tom Lane
Date:
<kynn@panix.com> writes:
> The ideal scenario would be to have a dummy database that is identical
> in every respect to the real database, except that it has only a small
> amount of data that is put into it by the testing software.

"pg_dump -s" will help you make an empty database; generating the small
amount of test data you need is left as an exercise ...

            regards, tom lane