如何使用外部数据源(文本文件)进行机器人框架数据驱动测试?

时间:2014-10-20 15:00:28

标签: robotframework data-driven-tests

基于以下示例。
- 是否可以将测试用例放入文本文件中?
- 怎么样?
---------------------------------------------- -------------------------------------------------- -----------------------------------

*** settings ***
    Test Setup 
    Go to url
    Test Teardown CLose Browser
    Test Template Valid input
    Library Selenium2Library

*** variables ***
    ${URL} some url
    ${BROWSER}firefox

*** testcases ***  NAME AGE GENDER  SELECTEDGENDER   CHECKBOX
    valid name Ringo 20 Male entry.351010933  entry.1887354367
    Maximum name Paul McCartney 21 Male entry.351010933 entry.1887354367
    Minimum name John 22Male entry.351010933    entry.175266393

*** keywords ***
Valid input
 [Arguments]${NAME}${AGE}${GENDER}${SELECTEDGENDER}    ${CHECKBOX}
    Input Textid=entry_1563791636${NAME}
    Input Textid=entry_930637752${AGE}
    Select Radio Button${SELECTEDGENDER}${GENDER}
    Click Buttonid=ss-submit
    Select Checkbox${CHECKBOX}
    Click Buttonid=ss-submit


    Go to url
    Open Browser${URL}${BROWSER}

0 个答案:

没有答案