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 theTest2::Harness::Settingsreference, 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โ theTest2::Harness::Settingsreference, 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_datalooks 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 notexitor 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 โ๏ธ
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
- ubuntu stonking: libtest2-harness-perl 1.000172-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