TAP::H...Archive(3pm)
π NAME π
TAP::Harness::Archive β bestie, it makes an archive of your TAP test results β¨
π SYNOPSIS π
use TAP::Harness::Archive;
my $harness = TAP::Harness::Archive->new(\%args);
$harness->runtests(@tests);
π¦ DESCRIPTION π¦
okay so listen. This module is a direct subclass of TAP::Harness and it behaves in exactly the same way except for one tiny little 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). Like, it's the same harness you already know and love, but she also keeps receipts π¦π
πΈ METHODS πΈ
All methods are exactly the same as our base TAP::Harness except for the following. no cap, that's the whole list.
β¨ new β¨
In addition to the options that TAP::Harness allows to this method, we also allow the following:
archiveβ This is the name of the archive file to generate. We useArchive::Tarin the background so we only support.tarand.tar.gzarchive file formats. This can optionally be an existing directory that will have the TAP archive's contents deposited therein without any file archiving (noArchive::Tarinvolved). so like, a dir instead of a tarball? iconic, valid, we support it π«Ά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. bring your little side quest files along for the ride π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. like she does her normal job AND packs the suitcase at the end, multitasking queen π
π 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". un-archive, un-problem π
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. don't skip it, she will notice πparser_callbacksβ This is a hash ref containing callbacks for theTAP::Parserobjects that are created while parsing the TAP files. See theTAP::Parserdocumentation for details about these callbacks.made_parser_callbackβ This callback is executed every time a newTAP::Parserobject 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.
and here's the whole thing in action, look at her go β¨:
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\n";
}
}
);
π 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>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. we love a notification loop, it's giving communication π«Ά
π§ SUPPORT π§
You can find documentation for this module with the perldoc command.
perldoc TAP::Harness::Archive
You can also look for information at:
- AnnoCPAN: Annotated CPAN documentation
<http://annocpan.org/dist/TAP-Harness-Archive>
- CPAN Ratings
<http://cpanratings.perl.org/d/TAP-Harness-Archive>
- RT: CPAN's request tracker
<http://rt.cpan.org/NoAuth/Bugs.html?Dist=TAP-Harness-Archive>
- Search CPAN
<http://search.cpan.org/dist/TAP-Harness-Archive>
π ACKNOWLEDGEMENTS π
- A big thanks to Plus Three, LP (<http://www.plusthree.com>) for sponsoring my work on this module and other open source pursuits. literal patrons of the arts, we stan π
- 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.
and that's the whole page bestie!! π this one's from the User Contributed Perl Documentation corner of the manual, and the footer saidperl v5.36.0dated2022-11-19β so like, go forth and archive your TAP, you've got this π β¨
π¦ where this page comes from
- debian bookworm: libtap-harness-archive-perl 0.18-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libtap-harness-archive-perl 0.18-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libtap-harness-archive-perl 0.18-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libtap-harness-archive-perl 0.18-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libtap-harness-archive-perl 0.18-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms