Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

tap::formatter::junit(3pm) [debian man page]

TAP::Formatter::JUnit(3pm)				User Contributed Perl Documentation				TAP::Formatter::JUnit(3pm)

NAME
TAP::Formatter::JUnit - Harness output delegate for JUnit output SYNOPSIS
On the command line, with prove: prove --formatter TAP::Formatter::JUnit ... Or, in your own scripts: use TAP::Harness; my $harness = TAP::Harness->new( { formatter_class => 'TAP::Formatter::JUnit', merge => 1, } ); $harness->runtests(@tests); DESCRIPTION
This code is currently in alpha state and is subject to change. "TAP::Formatter::JUnit" provides JUnit output formatting for "TAP::Harness". By default (e.g. when run with prove), the entire test suite is gathered together into a single JUnit XML document, which is then displayed on "STDOUT". You can, however, have individual JUnit XML files dumped for each individual test, by setting c<PERL_TEST_HARNESS_DUMP_TAP> to a directory that you would like the JUnit XML dumped to. Note, that this will also cause "TAP::Harness" to dump the original TAP output into that directory as well (but IMHO that's ok as you've now got the data in two parsable formats). Timing information is included in the JUnit XML, if you specified "--timer" when you ran prove. In standard use, "passing TODOs" are treated as failure conditions (and are reported as such in the generated JUnit). If you wish to treat these as a "pass" and not a "fail" condition, setting "ALLOW_PASSING_TODOS" in your environment will turn these into pass conditions. The JUnit output generated is partial to being grokked by Hudson (<http://hudson.dev.java.net/>). That's the build tool I'm using at the moment and needed to be able to generate JUnit output for. ATTRIBUTES
testsuites List-ref of test suites that have been executed. xml An "XML::Generator" instance, to be used to generate XML output. METHODS
open_test($test, $parser) Over-ridden "open_test()" method. Creates a "TAP::Formatter::JUnit::Session" session, instead of a console formatter session. summary($aggregate) Prints the summary report (in JUnit) after all tests are run. add_testsuite($suite) Adds the given XML test $suite to the list of test suites that we've executed and need to summarize. AUTHOR
Graham TerMarsch <cpan@howlingfrog.com> Many thanks to Andy Armstrong et al. for the fabulous set of tests in "Test::Harness"; they became the basis for the unit tests here. Other thanks go out to those that have provided feedback, comments, or patches: Mark Aufflick Joe McMahon Michael Nachbaur Marc Abramowitz Colin Robertson Phillip Kimmey Dave Lambley COPYRIGHT
Copyright 2008-2010, Graham TerMarsch. All Rights Reserved. This is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO
TAP::Formatter::Console, TAP::Formatter::JUnit::Session, <http://hudson.dev.java.net/>, 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 <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>, <http://confluence.atlassian.com/display/BAMBOO/JUnit+parsing+in+Bamboo>. perl v5.14.2 2012-03-12 TAP::Formatter::JUnit(3pm)

Check Out this Related Man Page

TAP::Formatter::Base(3pm)				 Perl Programmers Reference Guide				 TAP::Formatter::Base(3pm)

NAME
TAP::Formatter::Base - Base class for harness output delegates VERSION
Version 3.26 DESCRIPTION
This provides console orientated output formatting for TAP::Harness. SYNOPSIS
use TAP::Formatter::Console; my $harness = TAP::Formatter::Console->new( \%args ); METHODS
Class Methods "new" my %args = ( verbose => 1, ) my $harness = TAP::Formatter::Console->new( \%args ); The constructor returns a new "TAP::Formatter::Console" object. If a TAP::Harness is created with no "formatter" a "TAP::Formatter::Console" is automatically created. If any of the following options were given to TAP::Harness->new they well be passed to this constructor which accepts an optional hashref whose allowed keys are: o "verbosity" Set the verbosity level. o "verbose" Printing individual test results to STDOUT. o "timer" Append run time for each test to output. Uses Time::HiRes if available. o "failures" Show test failures (this is a no-op if "verbose" is selected). o "comments" Show test comments (this is a no-op if "verbose" is selected). o "quiet" Suppressing some test output (mostly failures while tests are running). o "really_quiet" Suppressing everything but the tests summary. o "silent" Suppressing all output. o "errors" If parse errors are found in the TAP output, a note of this will be made in the summary report. To see all of the parse errors, set this argument to true: errors => 1 o "directives" If set to a true value, only test results with directives will be displayed. This overrides other settings such as "verbose", "failures", or "comments". o "stdout" A filehandle for catching standard output. o "color" If defined specifies whether color output is desired. If "color" is not defined it will default to color output if color support is available on the current platform and output is not being redirected. o "jobs" The number of concurrent jobs this formatter will handle. o "show_count" Boolean value. If false, disables the "X/Y" test count which shows up while tests are running. Any keys for which the value is "undef" will be ignored. "prepare" Called by Test::Harness before any test output is generated. This is an advisory and may not be called in the case where tests are being supplied to Test::Harness by an iterator. "open_test" Called to create a new test session. A test session looks like this: my $session = $formatter->open_test( $test, $parser ); while ( defined( my $result = $parser->next ) ) { $session->result($result); exit 1 if $result->is_bailout; } $session->close_test; "summary" $harness->summary( $aggregate ); "summary" prints the summary report after all tests are run. The first argument is an aggregate to summarise. An optional second argument may be set to a true value to indicate that the summary is being output as a result of an interrupted test run. perl v5.18.2 2014-01-06 TAP::Formatter::Base(3pm)
Man Page