自动化测试之Robot Framework

RobotFramework学习01-套件文件中的表与基本用法

2018-09-17  本文已影响98人  残阳夕露

RobotFramework学习笔记目录


套件(数据)文件中的表

RF支持四种表

四种表的基本用法

Settings
*** Settings ***
Library         pylib.SchoolClassLib
Suite Setup     xxx
Suite Teardown  xxx
Test Setup      xxx
Test Teardown   xxx
Force Tags      xxx
Default Tags    xxx
Test Template   xxx
Resource        xxx
Test Cases
*** Test Cases ***
case1
    xxx
case2
    xxx
Variables
*** Variables ***
${jane home}    /home/jane
@{list}         1,2,3,4
Keywords
*** Keywords ***
Open Login Page
    Open Browser        http://host/login.html
    Title Should Be     Login Page
Title Should Start With
    [Arguments]         ${expected}
    ${title}=           Get Title
    Should Start With   ${title}    ${expected}

Test Cases测试用例表语法

上一篇 下一篇

猜你喜欢

热点阅读