1TAP::Formatter::JUnit(3U)ser Contributed Perl DocumentatiToAnP::Formatter::JUnit(3)
2
3
4

NAME

6       TAP::Formatter::JUnit - Harness output delegate for JUnit output
7

SYNOPSIS

9       On the command line, with prove:
10
11         prove --formatter TAP::Formatter::JUnit ...
12
13       Or, in your own scripts:
14
15         use TAP::Harness;
16         my $harness = TAP::Harness->new( {
17             formatter_class => 'TAP::Formatter::JUnit',
18             merge => 1,
19         } );
20         $harness->runtests(@tests);
21

DESCRIPTION

23       This code is currently in alpha state and is subject to change.
24
25       "TAP::Formatter::JUnit" provides JUnit output formatting for
26       "TAP::Harness".
27
28       By default (e.g. when run with prove), the entire test suite is
29       gathered together into a single JUnit XML document, which is then
30       displayed on "STDOUT".  You can, however, have individual JUnit XML
31       files dumped for each individual test, by setting
32       c<PERL_TEST_HARNESS_DUMP_TAP> to a directory that you would like the
33       JUnit XML dumped to.  Note, that this will also cause "TAP::Harness" to
34       dump the original TAP output into that directory as well (but IMHO
35       that's ok as you've now got the data in two parsable formats).
36
37       Timing information is included in the JUnit XML, if you specified
38       "--timer" when you ran prove.
39
40       In standard use, "passing TODOs" are treated as failure conditions (and
41       are reported as such in the generated JUnit).  If you wish to treat
42       these as a "pass" and not a "fail" condition, setting
43       "ALLOW_PASSING_TODOS" in your environment will turn these into pass
44       conditions.
45
46       The JUnit output generated is partial to being grokked by Hudson
47       (<http://hudson.dev.java.net/>).  That's the build tool I'm using at
48       the moment and needed to be able to generate JUnit output for.
49

ATTRIBUTES

51       testsuites
52           List-ref of test suites that have been executed.
53
54       xml An "XML::Generator" instance, to be used to generate XML output.
55

METHODS

57       open_test($test, $parser)
58           Over-ridden "open_test()" method.
59
60           Creates a "TAP::Formatter::JUnit::Session" session, instead of a
61           console formatter session.
62
63       summary($aggregate)
64           Prints the summary report (in JUnit) after all tests are run.
65
66       add_testsuite($suite)
67           Adds the given XML test $suite to the list of test suites that
68           we've executed and need to summarize.
69

AUTHOR

71       Graham TerMarsch <cpan@howlingfrog.com>
72
73       Many thanks to Andy Armstrong et al. for the fabulous set of tests in
74       "Test::Harness"; they became the basis for the unit tests here.
75
76       Other thanks go out to those that have provided feedback, comments, or
77       patches:
78
79         Mark Aufflick
80         Joe McMahon
81         Michael Nachbaur
82         Marc Abramowitz
83         Colin Robertson
84         Phillip Kimmey
85         Dave Lambley
86
88       Copyright 2008-2010, Graham TerMarsch.  All Rights Reserved.
89
90       This is free software; you can redistribute it and/or modify it under
91       the same terms as Perl itself.
92

SEE ALSO

94       TAP::Formatter::Console, TAP::Formatter::JUnit::Session,
95       <http://hudson.dev.java.net/>,
96       <http://jra1mw.cvs.cern.ch:8180/cgi-bin/jra1mw.cgi/org.glite.testing.unit/config/JUnitXSchema.xsd?view=markup&content-type=text%2Fvnd.viewcvs-markup&revision=HEAD>,
97       <http://confluence.atlassian.com/display/BAMBOO/JUnit+parsing+in+Bamboo>.
98
99
100
101perl v5.32.0                      2020-07-28          TAP::Formatter::JUnit(3)
Impressum