Search code examples
perlpgtap

How do I write tests in Perl with pgTAP?


http://pgtap.org/integration.html#perl mentions how to run the tests, but I cannot find an example of a Perl test case.

Do I have to get a DBI connection manually, run my commands on it, and check the results? Does it even make sense to use Perl vs SQL code? Am I missing something?


Solution

  • pgTap is for parsing SQL output - output from running an SQL script via psql from the command line. An SQL script that contains pgTap SQL calls mixed in with the SQL statements that you wish to test.

    As such, DBI doesn't enter into it.