Test2:...nderer(3pm)

๐Ÿ’– Test2:...nderer โ€” it's the Test2::Harness::Renderer era ๐Ÿ’–

okay so bestie, welcome to the User Contributed Perl Documentation corner of the internet, this is Test2:...nderer(3pm) and she's a whole mood โœจ


๐ŸŒธ NAME ๐ŸŒธ

Test2::Harness::Renderer โ€” bestie, she's the base class for Test2::Harness event renderers. she's the blueprint, the blueprint-iest blueprint ๐ŸŽ€


๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

soooo this section is literally just vibes in the original, there's nothing here ๐Ÿ’€ the description is empty, no cap. moving on, the real tea is below ๐Ÿ‘‡


โœจ ATTRIBUTES โœจ

heads up bestie, these get set at construction time and they are NOT changeable after that. set once, slay forever, periodt ๐Ÿ’…

  • $settings = $renderer->settings โ€” grab the Test2::Harness::Settings reference, it's giving "the receipts" ๐Ÿ“‹
  • $int = $renderer->verbose โ€” tells you the verbosity level, i.e. how chatty this thing is feeling ๐Ÿ—ฃ๏ธ
  • $bool = $renderer->progress โ€” true if progress indicators should be shown. true = we're showing the little progress bar moment ๐ŸŒˆ
  • $bool = $renderer->color โ€” true if color should be used ๐ŸŽจ no color = sad beige terminal energy, honestly

๐Ÿ‘‘ METHODS ๐Ÿ‘‘

  • $renderer->render_event($event) โ€” called for EVERY single event. the return value? ignored. it's giving "not me, not my problem" ๐Ÿ™ˆ
  • $renderer->finish(%ARGS) โ€” called once, after all the testing is done. this is the finale, the last episode, the closing credits ๐ŸŽฌ

%ARGS: looks like this, bestie:

  • settings => $settings โ€” the Test2::Harness::Settings reference, she's back for the encore ๐Ÿ“‹
  • pass => $bool โ€” true if the tests passed โœ…
  • tests_seen => $int โ€” how many test files we saw ๐Ÿ‘€
  • asserts_seen => $int โ€” how many assertions got made, count 'em ๐Ÿงฎ
  • final_data => $final_data โ€” okay this one's the main character. final_data looks like the thing below, and note that some data may just not be present if it's not applicable to your situation. the whole structure can be as simple as "{ pass => $bool }", lowkey minimal, highkey iconic ๐Ÿซถ
{
    pass => $pass,    # boolean, did the test run pass or fail?

    failed => [       # Jobs that failed, and did not pass on a retry
        [$job_id1, $file1],    # Failing job 1
        [$job_id2, $file2],    # Failing job 2
        ...
    ],
    retried => [               # Jobs that failed and were retried
        [$job_id1, $times_run1, $file1, $passed_eventually1],    # Passed_eventually is a boolean
        [$job_id2, $times_run2, $file2, $passed_eventually2],
        ...
    ],
    hatled => [                                                  # Jobs that caused the entire test suite to halt
        [$job_id1, $file1, $halt_reason1],                       # halt_reason is a human readible string
        [$job_id2, $file2, $halt_reason2],
    ],
}
  • $renderer->signal($signal) โ€” called when the rendering process catches a signal ๐Ÿšจ this is your moment to do any cleanup or report the signal. this is not an event, so you can literally just ignore it if you want, no pressure. but bestie, please do not exit or throw any exceptions here, we are NOT doing that in this house ๐Ÿ’€
real talk: signal is a clean-up-and-be-chill zone. no exiting, no throwing. we keep it cute and we keep it calm ๐Ÿง˜โ€โ™€๏ธ

๐ŸŽ€ SOURCE ๐ŸŽ€

the source code repository for Test2-Harness lives right here bestie, go look:

http://github.com/Test-More/Test2-Harness/


๐Ÿ’œ MAINTAINERS ๐Ÿ’œ

Chad Granum <exodist@cpan.org> โ€” carrying this whole thing on their back fr fr ๐Ÿซก


๐Ÿ’œ AUTHORS ๐Ÿ’œ

Chad Granum <exodist@cpan.org> โ€” yes the same legend, we said what we said ๐Ÿ‘‘


Copyright 2020 Chad Granum <exodist7@gmail.com>.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

See http://dev.perl.org/licenses/


and that's the whole page bestie, you ate that ๐Ÿ’…

this little treasure was brought to you by perl v5.40.1, dated 2026-05-10 โ€” go forth and render those events, you gorgeous human ๐ŸŒธ๐Ÿฆ‹โœจ

๐Ÿ“ฆ where this page comes from