zoukankan      html  css  js  c++  java
  • 简例


    注意robot的case格式
    # *** Variables ***
    
    # *** Settings ***
    # Library    String
    # Library    Selenium2Library
    
    
    *** Test Cases ***
    test case1
        log    Robot Framework
        log    Python
    
    test case2
        ${a}    set variable    Javascript
        log    ${a}
        
    test case3
        ${hi}    catenate    hello    world
        log    ${hi}
    
    test case4
        ${str}    catenate    SEPARATOR=--    hello    world
        log    ${str}
    
    test case5-list
        @{abc}    create list    a  b  c
        log many    @{abc}
    
    test case6-get time
        ${t}    get time
        log    ${t}

    查看运行结果:

    Starting test: Rf Test.Helloworld.test case1
    20180519 10:30:18.990 : INFO : Robot Framework
    20180519 10:30:18.992 : INFO : Python
    Ending test: Rf Test.Helloworld.test case1
    
    Starting test: Rf Test.Helloworld.test case2
    20180519 10:30:18.997 : INFO : ${a} = Javascript
    20180519 10:30:18.998 : INFO : Javascript
    Ending test: Rf Test.Helloworld.test case2
    
    Starting test: Rf Test.Helloworld.test case3
    20180519 10:30:19.001 : INFO : ${hi} = hello world
    20180519 10:30:19.002 : INFO : hello world
    Ending test: Rf Test.Helloworld.test case3
    
    Starting test: Rf Test.Helloworld.test case4
    20180519 10:30:19.006 : INFO : ${str} = hello--world
    20180519 10:30:19.007 : INFO : hello--world
    Ending test: Rf Test.Helloworld.test case4
    
    Starting test: Rf Test.Helloworld.test case5-list
    20180519 10:30:19.011 : INFO : @{abc} = [ a | b | c ]
    20180519 10:30:19.012 : INFO : a
    20180519 10:30:19.012 : INFO : b
    20180519 10:30:19.013 : INFO : c
    Ending test: Rf Test.Helloworld.test case5-list
    
    Starting test: Rf Test.Helloworld.test case6-get time
    20180519 10:30:19.017 : INFO : ${t} = 2018-05-19 10:30:19
    20180519 10:30:19.020 : INFO : 2018-05-19 10:30:19
    Ending test: Rf Test.Helloworld.test case6-get time
    

      

  • 相关阅读:
    大道至简 读后感01
    《人月神话》读后感
    水王继续
    软工大作业DB天气项目风险评估
    自我调查 使用输入法
    课堂练习之找“水王”
    浪潮之巅阅读笔记之三
    浪潮之巅阅读笔记之二
    浪潮之巅阅读笔记之一
    课程改进意见
  • 原文地址:https://www.cnblogs.com/studyddup0212/p/9059610.html
Copyright © 2011-2022 走看看