Skip to content

Disabling a Test Case in the profile does not prevent it from being run if called explicitly #1284

@tgreenx

Description

@tgreenx

The profile can be used to prevent Test Cases from being run (i.e. by removing them from the profile). This is true when Engine runs the whole test suite, or even specific Test modules, but not when running specific Test Cases (i.e., using Zonemaster::Engine/test_method() or Zonemaster::Engine::Test/run_one()). That is because the checks are done directly in the all() method of each Test module (with the help of Zonemaster::Engine::Util/should_run_test()). That method is not used when running specific Test Cases.

For example, using Zonemaster-CLI, after removing Address01 from the profile (note that Engine is started twice because of two --test arguments):

$ zonemaster-cli --show-testcase --test Address --test Address/address01 --level DEBUG --no-ipv6 --raw zonemaster.net | grep TEST_CASE_START
   0.00 DEBUG    ADDRESS02      TEST_CASE_START   testcase=address02
   3.33 DEBUG    ADDRESS03      TEST_CASE_START   testcase=address03
   0.00 DEBUG    ADDRESS01      TEST_CASE_START   testcase=address01

It could be intentional, but that seems odd to me. So, bug or feature? I would advocate for the former.

Metadata

Metadata

Assignees

Labels

A-TestCaseArea: Test case specification or implementation of test caseS-PRforIssueStatus: There is a PR that is meant to resolve the issue

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions