| Zonemaster::Engine::Test(3pm) | User Contributed Perl Documentation | Zonemaster::Engine::Test(3pm) |
Zonemaster::Engine::Test - Module implementing methods to find, load and execute all Test modules
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);
Test modules are defined as modules with names starting with "Zonemaster::Engine::Test::". They are expected to provide at least the following class methods:
_log_versions();
Adds logging messages regarding the current version of some modules, specifically for Zonemaster::Engine and other dependency modules (e.g. Zonemaster::LDNS).
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.
my @logentry_array = run_all_for( $zone );
Runs the default set of tests of all Test modules found for the given zone.
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. 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.
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.
my @logentry_array = run_module( $module, $zone );
Runs the default set of tests of the given Test module for the given zone.
The Test module must be in the list of actively loaded modules (that is, a module defined in the share/modules.txt file). 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.
my @logentry_array = run_one( $module, $test_case, $zone );
Runs the given Test Case of the given Test module for the given zone.
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.
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.
| 2025-03-21 | perl v5.40.1 |