Skip to content

Deprecate setting tags starting with a hyphen like -tag using the [Tags] setting #4380

Closed

Description

@pekkaklarck

We are planning to support removing globally set tags using the -tag syntax with the [Tags] setting both with tests and keywords (#4374). Because it is possible that tags using this format have been used, we need to deprecate this syntax first. In practice this kind of usages will cause deprecation warnings:

*** Test Cases ***
Example
    [Tags]    -example
    Keyword

*** Keywords ***
Keyword
    [Tags]    -another
    No Operation

This change applies only to the [Tags] setting, so using the -tag syntax in Settings has no special meaning and will cause no warning. It will also be possible to escape the -tag syntax with the [Tags] setting like \-tag in which case the literal value -tag will be used. Finally, if a tag is specified as a variable, the value is resolved only at the execution time and is used as-is. In practice this example would work without a warning and the test will get tags -example, -another and -third:

*** Settings ***
Test Tags        -example

*** Variables ***
${TAG}           -another

*** Test Cases ***
Example
    [Tags]    \-third    ${TAG}
    Keyword

Activity

  1. added this to the v5.1 milestone on Jun 22, 2022
  2. added a commit that references this issue on Mar 23, 2024
    fba95ea
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions