Zonema...::Test(3pm)
β¨ NAME β¨
okay bestie, welcome to Zonema...::Test(3pm) β yes the header really does abbreviate it like that, she's mysterious π
This is Zonemaster::Engine::Test, and she's the module that implements the methods to find, load and execute all Test modules. That's it, that's the whole job. She's the girl who knows where all the other girls are and makes them run. π
πΈ SYNOPSIS πΈ
my @results = Zonemaster::Engine::Test->run_all_for($zone);
my @results = Zonemaster::Engine::Test->run_module('DNSSEC', $zone);
my @results = Zonemaster::Engine::Test->run_one('DNSSEC', 'dnssec01', $zone);
literally three lines and you're running tests, no cap. β¨
π¦ TEST MODULES π¦
So here's the vibe: a Test module is any module whose name starts with Zonemaster::Engine::Test::. Like, that's the dress code. If your name starts with that, you're invited. π
And they're expected to provide at least these class methods (at least, bestie β you can bring more):
all()β this one gets aZonemaster::Engine::Zoneobject as its only argument, and after it's run the Test Cases for that Test module, it's expected to return a list ofZonemaster::Engine::Logger::Entryobjects. This is literally the entry point used by therun_all_for()andrun_module()methods of this class. main character method fr. π₯version()β must return the version of the Test module. that's it. she tells you her age. πmetadata()β must return a reference to a hash. The keys are the names of all Test Cases in the module, and the values are references to an array containing all the message tags that the Test Case can use in log entries. β¨tag_descriptions()β must return a reference to a hash where the keys are the message tags and the values are strings (message IDs) corresponding to user-friendly English translations of those message tags. β οΈ and listen: keep in mind that the message ids will be used as keys to look up translations into other languages, so think twice before editing them. like fr, twice. π
π INTERNAL METHODS π
_log_versions()
_log_versions();
Adds logging messages regarding the current version of some modules β specifically for Zonemaster::Engine and other dependency modules (e.g. Zonemaster::LDNS). she's just keeping receipts on everybody's version numbers, iconic. π
π METHODS π
modules()
my @modules_array = modules();
Returns a list of strings containing the names of all available Test modules, based on the content of the share/modules.txt file. π
run_all_for()
my @logentry_array = run_all_for( $zone );
Runs the default set of tests of all Test modules found for the given zone. the full send. π
Test modules are looked up and loaded from the share/modules.txt file, and executed in the order in which they appear in the file. Line order is the law, periodt.
The default set of tests (Test Cases) is specified in the all() method of each Test module. They can be individually disabled by the profile. so if you don't wanna, you don't gotta. π«Ά
A test module may implement a can_continue() method to indicate lack of an extremely minimal level of function for the zone (e.g., it must have a parent domain, and it must have at least one functional name server). If lack of such minimal function is indicated, the testing harness is aborted. π See can_continue() in Zonemaster::Engine::Test::Basic for an example.
Takes a Zonemaster::Engine::Zone object.
Returns a list of Zonemaster::Engine::Logger::Entry objects.
run_module()
my @logentry_array = run_module( $module, $zone );
Runs the default set of tests of the given Test module for the given zone. just one module, but she's doing the most. π
The Test module must be in the list of actively loaded modules (that is, a module defined in the share/modules.txt file). no invite, no entry, bestie.
The default set of tests (Test Cases) is specified in the all() method of each Test module. They can be individually disabled by the profile. β¨
Takes a string (module name) and a Zonemaster::Engine::Zone object.
Returns a list of Zonemaster::Engine::Logger::Entry objects.
run_one()
my @logentry_array = run_one( $module, $test_case, $zone );
Runs the given Test Case of the given Test module for the given zone. hyper-specific, we love a targeted queen. π―
The Test module must be in the list of actively loaded modules (that is, a module defined in the share/modules.txt file), and the Test Case must be listed both in the metadata of the Test module exports and in the profile. two checkboxes, both required. β
β
Takes a string (module name), a string (test case name) and an array of Zonemaster::Engine::Zone objects.
Returns a list of Zonemaster::Engine::Logger::Entry objects.
ok and that's the whole page, bestie π«Ά nothing hidden, nothing skipped, we kept every option, every method, every path and every return type exactly where they belong. iykyk. π
and finally, the little sign-off the man page footer wanted: this one's from perl v5.40.1, dated 2026-03-21, and yes β that is the same Zonema...::Test(3pm) from the top being dramatic one last time. bye bestie, slay your zone ππ
π
π¦ where this page comes from
- ubuntu stonking: libzonemaster-perl 8.001.001-1 Β· BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms