TAP::F...ession(3pm)
π TAP::Formatter::JUnit::Session β the manual page, but make it cute π
okay bestie, so this one lives in the User Contributed Perl Documentation section of the perl man pages (it's a 3pm page, iykyk). it's literally called TAP::Formatter::JUnit::Session and honestly? it's giving backstage-pass energy for your test output. let's get into it π
β¨ NAME β¨
TAP::Formatter::JUnit::Session β Harness output delegate for JUnit output. yeah. it's the little guy that turns your TAP into JUnit. iconic behavior tbh π
πΈ DESCRIPTION πΈ
so, like, TAP::Formatter::JUnit::Session provides JUnit output formatting for TAP::Harness. that's the whole vibe. it's the session object that does the actual formatting work so your harness output comes out looking all JUnit-y. slay β¨
π¦ METHODS π¦
here's where it gets good. buckle up, bestie π
_initialize($arg_for)β an over-ridden private initializer. why did they override it? so we can accept a newpassing_todo_okargument at instantiation time. periodt. that's the entire reason. π«Άresult($result)β the harness calls this for each line of TAP it receives. internally, all of the TAP gets added to a queue until we hit the start of thenexttest β and at that point we flush the queue. why tho? because this lets us capture any error output or diagnostic info that comes after a test failure. so it's not being extra, it's being thorough. πβ¨close_test()β called to close the test session. what does it do? it flushes the queue if we've got anything left in it, dumps the JUnit to disk (if necessary), and adds the XML for this test suite to our formatter. clean. tidy. main character energy. πdump_junit_xml($testsuite)β dumps the JUnit for the given XML$testsuite, to the directory specified byPERL_TEST_HARNESS_DUMP_TAP. that env var is doing the heavy lifting here, so know it. πadd_testcase($case)β adds an XML test$caseto the list of testcases we've run in this session. one more in the pile, bestie. πxml()β returns a newXML::Generatorto generate XML output. and it's simply a shortcut to$self->formatter->xml(). that's it. no cap. shortcut city. β
π AUTHOR π
Graham TerMarsch <cpan@howlingfrog.com>
we love a credited author. give him his flowers π
π 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. so like, go off, redistribute responsibly π«Ά
π SEE ALSO π
TAP::Formatter::JUnitβ the main event. go read that one too, bestie. fr fr.
heads up: everything above is straight from the page, I just wrapped it in sparkles. no invented options, no vibes-based guesses. π
perl v5.40.0 Β· 2025-02-07 β that's the version and the date this page was generated, and that's a wrap on TAP::Formatter::JUnit::Session. go forth and format your JUnit, bestie, you've got this π
β¨π
π¦ where this page comes from
- debian trixie: libtap-formatter-junit-perl 0.17-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libtap-formatter-junit-perl 0.17-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libtap-formatter-junit-perl 0.17-1 Β· 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