Installing pgTap

The installation guide for Linux is on http://pgtap.org/, but I will take you through it here as well as I had some issues with the documentation. The bad news about pgTap is that it works best on Linux. It can work on Windows, but it is a bit of a hassle and you need Perl, so I am not going to guide you through it. So, we are going to install pgTap on the server that runs PostgreSQL, which is our Linux server. First, we need to download the latest version (0.97.0 at the time of writing). After that, we need to unzip the downloaded file and build it using make (as described in the docs). After that, we can run the installation script so PostgreSQL installs all the necessary scripts for testing our code:

sudo apt-get update ...

Get Continuous Integration, Delivery, and Deployment now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.