saurabh baid
saurabh baid

Reputation: 1877

How to create custom testcase settings in Robot Framework

I want to create a custom settings (OR Attribute) (say TEST_ID) in Robot Framework to tag them with test id. During teardown I will use that settings to update my test management tool to record the execution result.

*** Test Cases ***
Test With Settings
    [Documentation]    Another dummy test
    [Tags]    dummy    owner-johndoe
    [TEST_ID] XXX
    Log    Hello, world!

Upvotes: 1

Views: 708

Answers (1)

ombre42
ombre42

Reputation: 2384

There is no need to create a new attribute. You can use tags. You could tag your tests with something like ALMID:5432. In the teardown, the tags are available via the builtin variable @{TEST_TAGS}. The list could be searched and the id extracted from the tag.

Upvotes: 1

Related Questions