• RF中在测试用例集上设置标签


    1.有时候我们在执行测试用例时只想执行部分测试用例集下面的测试用例,这时可以在相应的测试用例集中设置标签,然后运行时选择标签执行对应的测试用例

    语法:

    *** Settings ***
    Force Tags  tagname

    2.示例
    *** Settings ***
    Library  api.checkin
    Variables  config/cfg.py
    Force Tags  old    #设置测试用例集的标签,代表用例集下面的每个测试用例都拥有这个标签
    
    *** Test Cases ***
    
    事中门诊入参校验-缺少字段
        compareResult  ${checkin_path_old_2}  201  4.0a
    
    事中门诊入参校验-多余字段
        compareResult  ${checkin_path_old_1}  201  4.0a
    
    事中门诊入参校验-空字段
        compareResult  ${checkin_path_old_4}  201  4.0a
    
    事中门诊入参校验-字段格式有误
        compareResult  ${checkin_path_old_3}  201  4.0a
    
    事中门诊入参校验-字段长度超长
        compareResult  ${checkin_path_old_5}  201  4.0a
    
    事中门诊入参校验-业务值
        compareResult  ${checkin_path_old_6}  201  4.0a
    
    事中门诊入参校验-不完整的XML
        compareResult  ${checkin_path_old_error}  201  4.0a
    
    事中门诊入参校验-正常的XML
        compareResult  ${checkin_path_old_0}  201  4.0a

    命令行运行:

    C:Userscalecheckapi>robot --pythonpath ./ --include old test
    ==============================================================================
    Test
    ==============================================================================
    Test.Checkin Opt Old
    ==============================================================================
    事中门诊入参校验-缺少字段                                             | PASS |
    ------------------------------------------------------------------------------
    事中门诊入参校验-多余字段                                             | PASS |
    ------------------------------------------------------------------------------
    事中门诊入参校验-空字段                                               | PASS |
    ------------------------------------------------------------------------------
    事中门诊入参校验-字段格式有误                                         | PASS |
    ------------------------------------------------------------------------------
    事中门诊入参校验-字段长度超长                                         | PASS |
    ------------------------------------------------------------------------------
    事中门诊入参校验-业务值                                               | PASS |
    ------------------------------------------------------------------------------
    事中门诊入参校验-不完整的XML                                          | PASS |
    ------------------------------------------------------------------------------
    事中门诊入参校验-正常的XML                                            | PASS |
    ------------------------------------------------------------------------------
    Test.Checkin Opt Old                                                  | PASS |
    8 critical tests, 8 passed, 0 failed
    8 tests total, 8 passed, 0 failed
    ==============================================================================
    Test                                                                  | PASS |
    8 critical tests, 8 passed, 0 failed
    8 tests total, 8 passed, 0 failed
    ==============================================================================
    Output:  C:Userscalecheckapioutput.xml
    Log:     C:Userscalecheckapilog.html
    Report:  C:Userscalecheckapi
    eport.html

     完整的标签设置场景参考:https://www.cnblogs.com/peipei-Study/archive/2019/12/24/12084382.html

  • 相关阅读:
    关于FPS游戏痕的问题
    移动端输入框获取焦点后,虚拟键盘弹起,把固定的底部也顶起来了
    正则匹配移动端
    js 判断对象是否为空
    jsonp跨域原理解析
    Webstorm的一些常用快捷键
    webstorm创建js文件时自动生成js注释
    帮你彻底搞懂JS中的prototype、__proto__与constructor(图解)
    this指北 (一篇读懂)
    原型链
  • 原文地址:https://www.cnblogs.com/pipile/p/12720962.html
Copyright © 2020-2023  润新知