是否可以在数据驱动的机器人框架测试中使用列表

时间:2018-11-08 20:07:47

标签: testing robotframework

*** Settings ***
Resource  resource_file.robot

*** Keywords ***
Test Template Fields
  [Arguments]  ${required_field}  ${optional_field}  ${ignored_field}
  Setup test  ${required_field}  ${optional_field}  ${ignored_field}
  Given Some data I want to test something

*** Test Cases ***
| * Test Case * | * Test Name *   | *Required Field*  | *Optional Field*   | *Ignored Field*                                     |
| 1 Test      | Test Template Fields | A_Required_Field | An_Optional_field | **Ignored_field1  Ignored_field2** |

是否可以在数据驱动测试中将项目列表传递给Robotframework关键字? (上表中的 Ignored_field1 Ignored_field2

1 个答案:

答案 0 :(得分:2)

 [Arguments]  ${required_field}  ${optional_field}  @{ignored_field}

将参数作为列表传递!