使用bdd样式时,如何使测试用例在机器人框架中由数据驱动?

时间:2018-09-10 20:59:23

标签: robotframework bdd

我的机器人框架中有一个BDD风格的测试用例。哪个正在调用API。 API中有一个变量,其值会更改。因此,我只想编写一个测试用例,并希望在执行完一个变量后对其进行更改。

请在下面找到代码:

*** Variables ***
   ${Upload_Project_Asset_To_Flagship_API}  /workstream/api/projects/${projectId}/assets/${assetId}/external?debug=1&user_id=${userId}

*** Test Cases ***
TC_01:
    When User Executes Upload Asset To Flagship API
    Then Assert the response after asset upload
    [Teardown]  User gets the uploaded file details

*** Keywords ***
User Executes Upload Asset To Flagship API
${resp}=         Put request  session1  ${Upload_Project_Asset_To_Flagship_API}  headers=${api_header}

0 个答案:

没有答案