robotframework基本语法一

*** Settings ***
Library     OperatingSystem
 #Settings:导入测试库,资源文件,变量文件,为创建测试套件和test cases定义元数据
*** Variables ***
# 定义变量
${MESSAGE}  Hello,world!
*** Test Cases ***
My Test
# 创建测试用例
    [Documentation]     Example test
    log  ${message}}

Another Test
    should be equal     ${message}  Hello,world!

*** Keywords ***
# 创建用户关键字
My Keyword
    [Arguments]  ${path}
    DIRECTORY SHOULD EXIST  ${path}

猜你喜欢

转载自www.cnblogs.com/jiyanjiao-702521/p/9253445.html