TAP::F...ession(3pm)

πŸ“¦
version 0.17 Β· 5 versions
, in debian trixie, ubuntu resolute, ubuntu stonking

πŸ’– 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 new passing_todo_ok argument 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 the next test β€” 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 by PERL_TEST_HARNESS_DUMP_TAP. that env var is doing the heavy lifting here, so know it. πŸ’…
  • add_testcase($case) β€” adds an XML test $case to the list of testcases we've run in this session. one more in the pile, bestie. πŸ“š
  • xml() β€” returns a new XML::Generator to 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 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