1 = Developing with pgTAP tests =
4 == Setting up pgTAP on your development server ==
6 Currently, Evergreen pgTAP tests expect a version of pgTAP (0.93)
7 that is not yet available in the packages for most Linux distributions.
8 Therefore, you will have to install pgTAP from source as follows:
10 . Download, make, and install pgTAP on your database server. pgTAP can
11 be downloaded from http://pgxn.org/dist/pgtap/ and the instructions
12 for building and installing the extension are available from
13 http://pgtap.org/documentation.html
15 . Create the pgTAP extension in your Evergreen database. Using `psql`,
16 connect to your Evergreen database and then issue the command:
19 ------------------------------------------------------------------------------
20 CREATE EXTENSION pgtap;
21 ------------------------------------------------------------------------------
23 == Running pgTAP tests ==
24 The pgTAP tests can be found in subdirectories of `Open-ILS/src/sql/Pg/`
27 * `t`: contains pgTAP unit tests that can be run on a freshly installed
29 * `live_t`: contains pgTAP unit tests meant to be run on an Evergreen
30 database that also has had the "concerto" sample data loaded on it
32 To run the pgTAP unit and regression tests, use the `pg_prove` command.
33 For example, from the Evergreen source directory, you can issue the
35 `pg_prove -U evergreen Open-ILS/src/sql/Pg/t Open-ILS/src/sql/Pg/t/regress`