|
NAMETAP::Harness::JUnit - Generate JUnit compatible output from TAP resultsSYNOPSISuse TAP::Harness::JUnit; my $harness = TAP::Harness::JUnit->new({ xmlfile => 'output.xml', package => 'database', # ... }); $harness->runtests(@tests); DESCRIPTIONThe only difference between this module and TAP::Harness is that this module adds the optional arguments 'xmlfile', 'package', and 'namemangle' that cause the output to be formatted into XML in a format similar to the one that is produced by the JUnit testing framework.METHODSThis module inherits all functions from TAP::Harness.newThese options are added (compared to TAP::Harness):
ENVIRONMENT VARIABLESThe name of the output file can be specified in the $JUNIT_OUTPUT_FILE environment variableThe package name that Hudson/Jenkins use to categorise test results can be specified in $JUNIT_PACKAGE. The name mangling mechanism used to rewrite test names can be specified in $JUNIT_NAME_MANGLE. (See namemangle documentation for available values.) SEE ALSOTAP::Formatter::JUnit at <https://metacpan.org/pod/TAP::Formatter::JUnit>The JUnit XML schema was obtained from <http://jra1mw.cvs.cern.ch:8180/cgi-bin/jra1mw.cgi/org.glite.testing.unit/config/JUnitXSchema.xsd?view=markup>. ACKNOWLEDGEMENTSThis module was partly inspired by Michael Peters's TAP::Harness::Archive. It was originally written by Lubomir Rintel (GoodData) "<lubo.rintel@gooddata.com>" and includes code from several contributors.The following people (in no specific order) have reported problems or contributed code to TAP::Harness::JUnit:
BUGSThe comments that are above the "ok" or "not ok" are considered the output of the test. This, though being more logical, is against TAP specification.XML::Simple is used to generate the output. This is suboptimal and involves some hacks. During testing the resulting files are not tested against the schema. This would be a good thing to do. CONTRIBUTINGSource code for TAP::Harness::JUnit is kept in a public Git repository. Visit <https://github.com/jlavallee/tap-harness-junit>.Bug reports and feature enhancement requests are tracked at <https://rt.cpan.org/Public/Dist/Display.html?Name=TAP-Harness-JUnit>. COPYRIGHT & LICENSECopyright 2008, 2009, 2010, 2011, 2012, 2013 TAP::Harness::JUnit contributors. All rights reserved.This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Visit the GSP FreeBSD Man Page Interface. |