Installing pgTap

The installation guide for Linux is on, 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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.