Обсуждение: Regression tests

Поиск
Список
Период
Сортировка

Regression tests

От
Chris Bitmead
Дата:
Let's say I want to write regression tests to ensure that everything
related to inheritance works. One test I would want would be to make
sure pg_dump works for inheritance. What is the preferred way to make
regression tests which aren't sql?


Re: [HACKERS] Regression tests

От
Thomas Lockhart
Дата:
> Let's say I want to write regression tests to ensure that everything
> related to inheritance works. One test I would want would be to make
> sure pg_dump works for inheritance. What is the preferred way to make
> regression tests which aren't sql?

This has come up just recently, and afaik we don't have a precedence
for it in the current regression tests.

I would advocate having another test fired by the Makefile, to
minimize the number of components which need to be running for the
fundamental tests using psql to work.

"make all" currently *builds* the tests
"make runtest" currently runs the basic tests
"make bigtest" runs the large numeric tests
"make runcheck" runs the parallel tests
...

The basic inheritance tests should be in the basic regression test.
But how about something like "make dumptest"...
                 - Thomas

-- 
Thomas Lockhart                lockhart@alumni.caltech.edu
South Pasadena, California


Re: [HACKERS] Regression tests

От
Tom Lane
Дата:
>> Let's say I want to write regression tests to ensure that everything
>> related to inheritance works. One test I would want would be to make
>> sure pg_dump works for inheritance. What is the preferred way to make
>> regression tests which aren't sql?

> This has come up just recently, and afaik we don't have a precedence
> for it in the current regression tests.

No, there are no formalized tests at all that exercise pg_dump.

The informal test that's been around for a while is to pg_dump
the regression database, load into a fresh DB, pg_dump again,
and compare the second dump's output to the first's.  But there's
no automation for this, and I'm not sure you can really expect
the resulting scripts to be bit-for-bit the same anyway (there
might be ordering differences).

If you feel like developing a more believable testing strategy
for pg_dump, ain't nobody gonna get in your way.
        regards, tom lane