1Test2::Harness::RendereUrs(e3r)Contributed Perl DocumentTaetsito2n::Harness::Renderer(3)
2
3
4

NAME

6       Test2::Harness::Renderer - Base class for Test2::Harness event
7       renderers.
8

DESCRIPTION

ATTRIBUTES

11       These are set at construction time and cannot be changed.
12
13       $settings = $renderer->settings
14           Get the Test2::Harness::Settings reference.
15
16       $int = $renderer->verbose
17           Get the verbosity level.
18
19       $bool = $renderer->progress
20           True if progress indicators should be shown.
21
22       $bool = $renderer->color
23           True if color should be used.
24

METHODS

26       $renderer->render_event($event)
27           Called for every event. Return is ignored.
28
29       $renderer->finish(%ARGS)
30           Called once after testing is done.
31
32           %ARGS:
33
34       $renderer->signal($signal)
35           Called when the rendering process receives a signal. This is your
36           chance to do any cleanup or report the signal. This is not an
37           event, you can ignore it. Do not exit or throw any exceptions here
38           please.
39
40           settings => $settings
41               Get the Test2::Harness::Settings reference.
42
43           pass => $bool
44               True if tests passed.
45
46           tests_seen => $int
47               Number of test files seen.
48
49           asserts_seen => $int
50               Number of assertions made.
51
52           final_data => $final_data
53               The final_data looks like this, note that some data may not be
54               present if it is not applicable. The data structure can be as
55               simple as "{ pass => $bool }".
56
57                   {
58                       pass => $pass,    # boolean, did the test run pass or fail?
59
60                       failed => [       # Jobs that failed, and did not pass on a retry
61                           [$job_id1, $file1],    # Failing job 1
62                           [$job_id2, $file2],    # Failing job 2
63                           ...
64                       ],
65                       retried => [               # Jobs that failed and were retried
66                           [$job_id1, $times_run1, $file1, $passed_eventually1],    # Passed_eventually is a boolean
67                           [$job_id2, $times_run2, $file2, $passed_eventually2],
68                           ...
69                       ],
70                       hatled => [                                                  # Jobs that caused the entire test suite to halt
71                           [$job_id1, $file1, $halt_reason1],                       # halt_reason is a human readible string
72                           [$job_id2, $file2, $halt_reason2],
73                       ],
74                   }
75

SOURCE

77       The source code repository for Test2-Harness can be found at
78       http://github.com/Test-More/Test2-Harness/.
79

MAINTAINERS

81       Chad Granum <exodist@cpan.org>
82

AUTHORS

84       Chad Granum <exodist@cpan.org>
85
87       Copyright 2020 Chad Granum <exodist7@gmail.com>.
88
89       This program is free software; you can redistribute it and/or modify it
90       under the same terms as Perl itself.
91
92       See http://dev.perl.org/licenses/
93
94
95
96perl v5.36.0                      2022-09-08       Test2::Harness::Renderer(3)
Impressum