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