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 a Zonemaster::Engine::Zone object as its only argument, and after it's run the Test Cases for that Test module, it's expected to return a list of Zonemaster::Engine::Logger::Entry objects. This is literally the entry point used by the run_all_for() and run_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