1TAP::Formatter::Base(3)User Contributed Perl DocumentatioTnAP::Formatter::Base(3)
2
3
4

NAME

6       TAP::Formatter::Base - Base class for harness output delegates
7

VERSION

9       Version 3.42
10

DESCRIPTION

12       This provides console orientated output formatting for TAP::Harness.
13

SYNOPSIS

15        use TAP::Formatter::Console;
16        my $harness = TAP::Formatter::Console->new( \%args );
17

METHODS

19   Class Methods
20       "new"
21
22        my %args = (
23           verbose => 1,
24        )
25        my $harness = TAP::Formatter::Console->new( \%args );
26
27       The constructor returns a new "TAP::Formatter::Console" object. If a
28       TAP::Harness is created with no "formatter" a "TAP::Formatter::Console"
29       is automatically created. If any of the following options were given to
30       TAP::Harness->new they well be passed to this constructor which accepts
31       an optional hashref whose allowed keys are:
32
33       ·   "verbosity"
34
35           Set the verbosity level.
36
37       ·   "verbose"
38
39           Printing individual test results to STDOUT.
40
41       ·   "timer"
42
43           Append run time for each test to output. Uses Time::HiRes if
44           available.
45
46       ·   "failures"
47
48           Show test failures (this is a no-op if "verbose" is selected).
49
50       ·   "comments"
51
52           Show test comments (this is a no-op if "verbose" is selected).
53
54       ·   "quiet"
55
56           Suppressing some test output (mostly failures while tests are
57           running).
58
59       ·   "really_quiet"
60
61           Suppressing everything but the tests summary.
62
63       ·   "silent"
64
65           Suppressing all output.
66
67       ·   "errors"
68
69           If parse errors are found in the TAP output, a note of this will be
70           made in the summary report.  To see all of the parse errors, set
71           this argument to true:
72
73             errors => 1
74
75       ·   "directives"
76
77           If set to a true value, only test results with directives will be
78           displayed.  This overrides other settings such as "verbose",
79           "failures", or "comments".
80
81       ·   "stdout"
82
83           A filehandle for catching standard output.
84
85       ·   "color"
86
87           If defined specifies whether color output is desired. If "color" is
88           not defined it will default to color output if color support is
89           available on the current platform and output is not being
90           redirected.
91
92       ·   "jobs"
93
94           The number of concurrent jobs this formatter will handle.
95
96       ·   "show_count"
97
98           Boolean value.  If false, disables the "X/Y" test count which shows
99           up while tests are running.
100
101       Any keys for which the value is "undef" will be ignored.
102
103       "prepare"
104
105       Called by Test::Harness before any test output is generated.
106
107       This is an advisory and may not be called in the case where tests are
108       being supplied to Test::Harness by an iterator.
109
110       "open_test"
111
112       Called to create a new test session. A test session looks like this:
113
114           my $session = $formatter->open_test( $test, $parser );
115           while ( defined( my $result = $parser->next ) ) {
116               $session->result($result);
117               exit 1 if $result->is_bailout;
118           }
119           $session->close_test;
120
121       "summary"
122
123         $harness->summary( $aggregate );
124
125       "summary" prints the summary report after all tests are run. The first
126       argument is an aggregate to summarise. An optional second argument may
127       be set to a true value to indicate that the summary is being output as
128       a result of an interrupted test run.
129
130
131
132perl v5.32.0                      2020-07-28           TAP::Formatter::Base(3)
Impressum