Test2:...ooling(3perl)
π NAME π
Test2::Manual::Tooling β the manual page for all my fellow tool authors out there, the 3perl girlies who wanna build stuff β¨
π DESCRIPTION π
okay so bestie, this whole section is about writing new tools, plugins, and basically any other Test2 component your little heart desires. it's giving "build your own adventure" fr fr. π
π οΈ TOOL TUTORIALS π οΈ
π± FIRST TOOL π±
Test2::Manual::Tooling::FirstTool β an intro to writing tools, and the move here is literally just cloning ok(). lowkey iconic of it.
π MOVING FROM Test::Builder π
Test2::Manual::Tooling::TestBuilder β this section maps all your Test::Builder methods over to Test2 concepts, so you can pack your bags and relocate with zero drama. no cap.
πͺ NESTING TOOLS πͺ
Test2::Manual::Tooling::Nesting β how to call other tools from inside your own tool. tools within tools, it's giving inception π
π§© TOOLS WITH SUBTESTS π§©
Test2::Manual::Tooling::Subtest β how to write tools that make use of subtests. yes bestie, you can have a whole subtest situation up in here.
π§ͺ TESTING YOUR TEST TOOLS π§ͺ
Test2::Manual::Tooling::Testing β you wrote a test tool, soβ¦ who tests the test tool? spoiler: this page. write tests for your tests, periodt. π
π PLUGIN TUTORIALS π
β‘ TAKING ACTION WHEN A NEW TOOL STARTS β‘
Test2::Manual::Tooling::Plugin::ToolStarts β how to add behaviors that fire off when a tool starts doing its thing. the vibe check happens right at the beginning, yk?
β TAKING ACTION AFTER A TOOL IS DONE β
Test2::Manual::Tooling::Plugin::ToolCompletes β how to add behaviors that happen when a tool completes its work. it ate and now we celebrate π
π TAKING ACTION AT THE END OF TESTING π
Test2::Manual::Tooling::Plugin::TestingDone β how to add behaviors that go off when testing is complete (that's IE done_testing, or just the end of the test).
πͺ TAKING ACTION JUST BEFORE EXIT πͺ
Test2::Manual::Tooling::Plugin::TestExit β how to safely add pre-exit behaviors. note the word safely, bestie, don't get feral in there π
π WRITING A SIMPLE JSONL FORMATTER π
Test2::Manual::Tooling::Formatter β how to write your very own custom formatter, and in our case specifically a JSONL formatter. main character energy truly. β¨
π WHERE TO FIND HOOKS AND APIS π
π global API π
Test2::API is the global API. this one is primarily used by plugins that provide global behavior. think of it as the group chat everyone's in π¬
π§ In hubs π§
Test2::Hub is the base class for all hubs. this is where the hooks for manipulating events live, and also where things that run at the end of testing live too. so many hooks, so little time. πͺ
π SEE ALSO π
Test2::Manualβ the primary index of the manual. start here if you're lost, queen, it's the map πΊοΈ
π¦ SOURCE π¦
the source code repository for Test2-Manual lives at https://github.com/Test-More/test-more/. go give it a star, it deserves it π«Ά
π MAINTAINERS π
- Chad Granum <exodist@cpan.org>
π AUTHORS π
- Chad Granum <exodist@cpan.org>
π COPYRIGHT π
Copyright Chad Granum <exodist@cpan.org>.
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 bestie, you're officially a Test2 tool author now, go slay π¦ and just so you know the vibes came from perl v5.44.0, dated 2026-10-17, straight out of Test2:...ooling(3perl) β mwah, love u, bye π
π¦ where this page comes from
- arch rolling: perl 5.44.0-1 Β· Artistic-1.0-Perl AND 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