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::Harness::Archive(3pm)				User Contributed Perl Documentation				TAP::Harness::Archive(3pm)

NAME
TAP::Harness::Archive - Create an archive of TAP test results SYNOPSIS
use TAP::Harness::Archive; my $harness = TAP::Harness::Archive->new(\%args); $harness->runtests(@tests); DESCRIPTION
This module is a direct subclass of TAP::Harness and behaves in exactly the same way except for one detail. In addition to outputting a running progress of the tests and an ending summary it can also capture all of the raw TAP from the individual test files or streams into an archive file (".tar" or ".tar.gz"). METHODS
All methods are exactly the same as our base TAP::Harness except for the following. new In addition to the options that TAP::Harness allow to this method, we also allow the following: archive This is the name of the archive file to generate. We use Archive::Tar in the background so we only support ".tar" and ".tar.gz" archive file formats. This can optionally be an existing directory that will have the TAP archive's contents deposited therein without any file archiving (no Archive::Tar involved). extra_files This is an array reference to extra files that you want to include in the TAP archive but which are not TAP files themselves. This is useful if you want to include some log files that contain useful information about the test run. extra_properties This is a hash reference of extra properties that you've collected during your test run. Some things you might want to include are the Perl version, the system's architecture, the operating system, etc. runtests Takes the same arguments as TAP::Harness's version and returns the same thing (a TAP::Parser::Aggregator object). The only difference is that in addition to the normal test running and progress output we also create the TAP Archive when it's all done. aggregator_from_archive This class method will return a TAP::Parser::Aggregator object when given a TAP Archive to open and parse. It's pretty much the reverse of creating a TAP Archive from using "new" and "runtests". It takes a hash of arguments which are as follows: archive The path to the archive file. This can also be a directory if you created the archive as a directory. This is required. parser_callbacks This is a hash ref containing callbacks for the TAP::Parser objects that are created while parsing the TAP files. See the TAP::Parser documentation for details about these callbacks. made_parser_callback This callback is executed every time a new TAP::Parser object is created. It will be passed the new parser object, the name of the file to be parsed, and also the full (temporary) path of that file. meta_yaml_callback This is a subroutine that will be called if we find and parse a YAML file containing meta information about the test run in the archive. The structure of the YAML file will be passed in as an argument. my $aggregator = TAP::Harness::Archive->aggregator_from_archive( { archive => 'my_tests.tar.gz', parser_callbacks => { plan => sub { warn "Nice to see you plan ahead..." }, unknown => sub { warn "Your TAP is bad!" }, }, made_parser_callback => sub { my ($parser, $file, $full_path) = @_; warn "$file is temporarily located at $full_path "; } } ); AUTHOR
Michael Peters, "<mpeters at plusthree.com>" BUGS
Please report any bugs or feature requests to "bug-tap-harness-archive at rt.cpan.org", or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=TAP-Harness-Archive <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=TAP-Harness-Archive>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. SUPPORT
You can find documentation for this module with the perldoc command. perldoc TAP::Harness::Archive You can also look for information at: o AnnoCPAN: Annotated CPAN documentation http://annocpan.org/dist/TAP-Harness-Archive <http://annocpan.org/dist/TAP-Harness-Archive> o CPAN Ratings http://cpanratings.perl.org/d/TAP-Harness-Archive <http://cpanratings.perl.org/d/TAP-Harness-Archive> o RT: CPAN's request tracker http://rt.cpan.org/NoAuth/Bugs.html?Dist=TAP-Harness-Archive <http://rt.cpan.org/NoAuth/Bugs.html?Dist=TAP-Harness-Archive> o Search CPAN http://search.cpan.org/dist/TAP-Harness-Archive <http://search.cpan.org/dist/TAP-Harness-Archive> ACKNOWLEDGEMENTS
o A big thanks to Plus Three, LP (<http://www.plusthree.com>) for sponsoring my work on this module and other open source pursuits. o Andy Armstrong COPYRIGHT &; LICENSE Copyright 2007 Michael Peters, all rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.12.4 2011-09-04 TAP::Harness::Archive(3pm)
Man Page