Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
amr1ta opened this issue Jul 8, 2021 · 0 comments
Open

Comments

@amr1ta
Copy link

amr1ta commented Jul 8, 2021

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

@amr1ta amr1ta changed the title Unable to access the keywords and variables used in a testcase or keyword Unable to access the keywords and variables used within a testcase Jul 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant