Skip to content

Unable to access the keywords and variables used within a testcase #91

@amr1ta

Description

@amr1ta

It looks like rflint is only able to detect keywords and variables which are under the respective tags *** Keywords *** and *** Variables ***.

Is there a way to detect keywords and variables which are used within a testcase.
Example:

*** Settings ***
Documentation     Access keywords and variables within testcase


*** Variables ***
${MESSAGE}        Hello, world!

*** Keywords ***
Keywords have the expected number of rows
     [Documentation]
    ... | Verify that that each keyword has the expected number of rows
    [Setup] | Set test variable | ${keyword_table} | ${rf.tables[4]}
    [Template] | Run keyword and continue on failure
    Length should be | ${keyword_table.keywords[0].rows} | 6
    Length should be | ${keyword_table.keywords[1].rows} | 3

*** Test Cases ***
Access keywords and variables within testcase
    [Documentation]
    ...    | Description | Access keywords and variables from tescase |
    ...    | Test Steps    | 1. log message |
    ${var}    Set Variable    test
    log    ${MESSAGE}    console=true
    log    ${my_var}    console=true
    Keywords have the expected number of rows

Here I want to access following keywords and variable with Access keywords and variables within testcase testcase:

  • log
  • Set Variable
  • Run keyword
  • ${my_var}

Config:
Python 2.7.5
Robot Framework 3.2.1
robotframework-lint 1.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions