File: README.md

package info (click to toggle)
libtap-parser-sourcehandler-pgtap-perl 3.35-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 164 kB
  • sloc: perl: 778; makefile: 2
file content (70 lines) | stat: -rw-r--r-- 2,373 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
TAP/Parser/SourceHandler/pgTAP version 3.35
===========================================

[![CPAN version](https://badge.fury.io/pl/TAP-Parser-SourceHandler-pgTAP.svg)](https://badge.fury.io/pl/TAP-Parser-SourceHandler-pgTAP)
[![Docker release](https://images.microbadger.com/badges/version/itheory/pg_prove.svg)](https://hub.docker.com/r/itheory/pg_prove/)
[![Build Status](https://travis-ci.org/theory/tap-parser-sourcehandler-pgtap.svg)](https://travis-ci.org/theory/tap-parser-sourcehandler-pgtap/)

This module adds support for executing [pgTAP](https://pgtap.org/) PostgreSQL
tests under Test::Harness and `prove. This is useful for executing your Perl
tests and your PostgreSQL tests together, and analyzing their results.

Most likely. you'll want to use it with `prove` to execute your Perl and
pgTAP tests:

    prove --source Perl \
          --ext .t --ext .pg \
          --source pgTAP --pgtap-option dbname=try \
                         --pgtap-option username=postgres \
                         --pgtap-option suffix=.pg

Or in `Build.PL` for your application with pgTAP tests in `t/*.pg`:

    Module::Build->new(
        module_name        => 'MyApp',
        test_file_exts     => [qw(.t .pg)],
        use_tap_harness    => 1,
        tap_harness_args   => {
            sources => {
                Perl  => undef,
                pgTAP => {
                    dbname   => 'try',
                    username => 'root',
                    suffix   => '.pg',
                },
            }
        },
        build_requires     => {
            'Module::Build'                     => '0.30',
            'TAP::Parser::SourceHandler::pgTAP' => '3.18',
        },
    )->create_build_script;

Installation
------------

To install this module, type the following:

    perl Build.PL
    ./Build
    ./Build test
    ./Build install

To run it from a [Docker image](https://hub.docker.com/r/itheory/pg_prove/):

    docker pull itheory/pg_prove
    curl -L https://git.io/fpgAk -o pg_prove && chmod +x pg_prove
    ./pg_prove --help

Dependencies
------------

TAP::Parser::SourceHandler::pgTAP requires TAP::Parser::SourceHandler.

Copyright and Licence
---------------------

Copyright (c) 2018-2018 David E. Wheeler. Some Rights Reserved.

This module is free software; you can redistribute it and/or modify it under
the same terms as Perl itself.