Test2:...Runner(3pm)
π Test2::Harness::Runner β the Runner(3pm) page, bestie edition π
So this is the manual for Test2::Harness::Runner, from the User Contributed Perl Documentation set. It's the base class for test runners. Yep, the parent of all the little runner classes. The blueprint. The blueprint that runs your whole test suite. iconic behavior honestly.
β¨ NAME β¨
Test2::Harness::Runner β base class for test runners. she's the mother of runners π
πΈ DESCRIPTION πΈ
Okay so real talk: this module does the heavy lifting of running all the tests. Like, all of it. The whole gym session. She's in the back doing the work while everyone else gets the credit. main character energy but make it infrastructure.
You should never need to create an instance of the runner yourself. Not your job, not your moment. In most cases the runner module is exposed via a callback or a plugin affordance β so it'll come find you when it wants to hang out π«Ά
π PUBLIC METHODS π
π FROM SETTINGS π
These are attributes with values set from the Test2::Harness::Settings instance created from command line arguments. (Yes, the original says "attributesd". We're leaving that typo exactly where it is. It's part of the lore now. fr fr.)
For the most up to date documentation on these, go look at App::Yath::Options::Runner. She's the source of truth bestie, not me.
$runner->includes$runner->tlib$runner->lib$runner->blib$runner->unsafe_inc$runner->use_fork$runner->preloads$runner->preload_threshold$runner->switches$runner->cover$runner->event_timeout$runner->post_exit_timeout
π¦ FROM CONSTRUCTION π¦
These attributes get set when the runner is created. Like, born-with-it attributes. congenital slay.
$path = $runner->dirβ path to the working directory. Where the vibes happen π$settings = $runner->settingsβ theApp::Yath::Settingsinstance. her settings, her rules β¨$coderef = $runner->fork_job_callbackβ callback used to spawn new tests via fork. fork fork fork π$coderef = $runner->respawn_runner_callbackβ callback to restart the runner process. you can't keep her down, she respawns π§$bool = $runner->monitor_preloadsβ true if preloads should be watched for changes. π watching, always watching$int = $runner->jobs_todoβ a count of total jobs to run. This will always be0in a persistent runner. zero. nada. don't @ me. π₯
π OTHER PUBLIC METHODS π
heads up bestie: If a method is not documented here then it is an implementation detail and you should not use it. not. documented. do not touch. it's giving private, it's giving stay out of my room π
$class = $runner->job_classβ class for new test jobs.$preload = $runner->preloaderβ get theTest2::Harness::Runner::Preloaderinstance.$state = $runner->stateβ get theTest2::Harness::Runner::Stateinstance.@list = $runner->all_libsβ get all the libs that should be added to@INCby default. Note that specific runs and even specific tests can have custom paths on top of these. so this is the baseline, the default fit, and then individual runs accessorize π
π₯ SOURCE π₯
The source code repository for Test2-Harness can be found at http://github.com/Test-More/Test2-Harness/. go star it, go lurk, go read the code π«Ά
π MAINTAINERS π
Chad Granum <exodist@cpan.org>
β AUTHORS β
Chad Granum <exodist@cpan.org>
π 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/
okay that's the whole page, no cap, every single line accounted for πΈ this was documented by the fine folks on perl v5.40.1, and the date on this one is 2026-05-10 β and yes, from the original it's still filed under Test2:...Runner(3pm) because the ellipsis is doing its own thing and we respect her journey π
π
π¦ 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