Status: Accepted
Owner: pekka.klarck
Labels: Type-Enhancement Priority-Low Target-2.7.4

New issue 1218 by robotframew...@gmail.com: Allow modifying test tags with `Fail` keyword
http://code.google.com/p/robotframework/issues/detail?id=1218

When using `Fail` keyword to fail a test case, it would sometimes be useful to be able to modify tests tags. You can already now do that using `Set Tags` or `Remove Tags` before `Fail`, but being able to do that in a one go would be even easier, especially if you are failing the test based on a certain condition.

Prefixing tags with hyphen (e.g. '-regression') ought to be suitable syntax for removing tags. Tags without a hyphen would be added.

Examples:

    # Fail test case unconditionally and add 'not-ready' tag.
    Fail    Keyword not ready    not-ready

    # Fail test case based on a condition and remove 'regression' tag.
    ${env ok} =    Verify test environment
Run Keyword If not ${env ok} Fail Environment not OK -regression

Reply via email to