How to run specific test cases from a test suite using Robot Framework

后端 未结 3 1608
耶瑟儿~
耶瑟儿~ 2021-02-03 22:45

I am new to Robot and am learning to write logic and test cases.

I have a test suite, "mytestsuite.robot", which has a lot of test cases. I have a couple of err

3条回答
  •  温柔的废话
    2021-02-03 23:36

    If you are using __init__.robot files that have setups and teardowns, you cannot directly call a test from a test file if you have nested directory structures like the following:

    |-- foo
        |-- bar.robot
    

    And the bar.robot file has a test case named baz, in this case, you can do the following:

    robot --test 'foo.bar.baz' foo
    

    With deeper nesting:

    |-- foo
        |-- bar
            |-- baz.robot
    
    robot --test 'foo.bar.baz.*' foo
    

    You can use * (asterisk) to run all test cases in the foo.bar.baz suite.

提交回复
热议问题