8000 Allow removing tags using `-tag` syntax also in `Test Tags` · Issue #5250 · robotframework/robotframework · GitHub
[go: up one dir, main page]

Skip to content
Allow removing tags using -tag syntax also in Test Tags #5250
Open
@romanliv

Description

@romanliv

Test Tags from *** Settings *** and [Tags] from Test Case behave differently when removing tags: while it is possible to remove tags with Test Case's [Tag] -something, Settings Test Tags -something introduces a new tag -something.
Running tests with these robot files (also attached):

  • __init__.robot:
    *** Settings ***
    Test Tags    something
    
  • -SomethingInSettings.robot:
    *** Settings ***
    Test Tags         -something
    
    
    *** Test Cases ***
    -Something In Settings
        Should Be Empty    ${TEST TAGS}
    
  • -SomethingInTestCase.robot:
    *** Test Cases ***
    -Something In Test Case
        [Tags]    -something
        Should Be Empty    ${TEST TAGS}
    

gives the following output:

> robot .
==============================================================================
TagsTest
==============================================================================
TagsTest.-SomethingInSettings
==============================================================================
-Something In Settings                                                | FAIL |
'['-something', 'something']' should be empty.
------------------------------------------------------------------------------
TagsTest.-SomethingInSettings                                         | FAIL |
1 test, 0 passed, 1 failed
==============================================================================
TagsTest.-SomethingInTestCase
==============================================================================
-Something In Test Case                                               | PASS |
------------------------------------------------------------------------------
TagsTest.-SomethingInTestCase                                         | PASS |
1 test, 1 passed, 0 failed
==============================================================================
TagsTest                                                              | FAIL |
2 tests, 1 passed, 1 failed
==============================================================================

(https://forum.robotframework.org/t/removing-tags-from-the-test-tags-setting/7513/6?u=romanliv confirms this as an issue to be fixed)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0