path r'c test.html',robot framework - robot命令参数解析
robot 命令参数解析
version > 3.0.1
原文档查看命令:
robot --help
robot -h
-F --extension value
通过文件扩展名控制需要执行的用例。如果只执行一个文件,这个参数无效。需要执行多个扩展名时,用“:”分隔开。
Examples:
--extension robot
-F robot:txt
-N --name name
设置测试套件的名称。如果包含“_”显示为空格。默认值为脚本所在目录的名称。不影响测试的执行过程。
Examples:
--name Regression_Test
-N Smoke
-D --doc documentation
设置整体测试报告的文档。如果包含“_”显示为空格。支持简单的html格式。不影响测试的执行过程。
Examples:
***bold***
http://url/
-M --metadata name:value
设置整体测试报告的数据信息,会显示在测试报告中。不影响测试的执行过程。
Examples:
--metadata version:1.2
--M version:1.2
-G --settag tag *
设置全局标签
Examples:
--settag tag1
--G tag2
-t --test name *
通过测试用名称控制执行范围
Examples:
--test casename1
-t testname2
-s --suite name *
通过测试套件名称控制测试执行范围
Examples:
--suite parentname.childname
-s suitename
-i --include tag *
通过标签控制测试执行范围,可以使用AND, OR, and NOT 操作符
Examples:
--include foo --include bar*
--include fooANDbar*
-e --exclude tag *
通过标签控制测试不执行范围
Examples:
--exclude tag1
-e tag2
-R --rerunfailed output
重新执行一个更早的output文件中的Fail的测试用例
Examples:
--rerunfailed output.xml
-R output.xml
-S --rerunfailedsuites output
重新执行一个更早的output文件中的Fail的Testsuite中的测试用例
Examples:
--rerunfailedsuites output.xml
-S output.xml
-c --critical tag *
设置重要标签的范围
Examples:
--critical tag1
-c tag2
-n --noncritical tag *
设置不重要标签的范围
Examples:
--noncritical tag1
-n tag2
-v --variable name:value *
添加参数
Examples:
--variable str:Hello =>${str} = `Hello`
-v hi:Hi_World -E space:_=>${hi} = `Hi World`
-v x: -v y:42=>${x} = ``, ${y} = `42`
-V --variablefile path *
添加参数文件
Examples:
--variablefile path/vars.yaml
--variablefile environment.py:testing
-d --outputdir dir
测试结果输出文件夹
Examples:
--outputdir result/
-d result/
-o --output file
测试结果数据文件名 Default: output.xml
Examples:
--output output.xml
-o out.xml
-l --log file
测试log文件名,可以通过None值禁用测试日志功能
Examples:
--log mylog.html
-l NONE
-r --report file
测试报告文件名,可以通过None值禁用测试报告功能
Examples:
--report myreport.html
-r NONE
-x --xunit file
兼容xUnit的报告,默认不创建
Examples:
--xunit myxunit1.xml
-x myxunit2.xml
--xunitskipnoncritical
在Xunit报告中标记不重要的测试
-T --timestampoutputs
创建带时间戳的报告文件 output-20070503-154410.xml,report-20070503-154410.html
Examples:
-T -o output.xml -r report.html -l none
--splitlog
把日志文件拆分成很多小的js文件
--logtitle title
设置显示在日志中的名称,“_”转化为空格“ ”
--reporttitle title
设置显示在测试报告中的名称,“_”转化为空格“ ”
--reportbackground colors
设置测试报告背景颜色
Examples:
--reportbackground green:yellow:red
--reportbackground #00E:#E00
-L --loglevel level
设置日志等级,可用的等级有: TRACE,DEBUG, INFO (默认值), WARN, NONE (没有日志).
Examples:
--loglevel DEBUG
--loglevel DEBUG:INFO
--suitestatlevel level
设置显示在测试报告和测试日志中的test suite层数
Examples: --suitestatlevel 3
--tagstatinclude tag *
***在Statistics by Tag中只包含匹配的标签 和“测试详细信息”在日志和报告。 默认 显示全部测试用例中设置的标签。 ***
Examples: --tagstatinclude tag1
--tagstatexclude tag *
***在Statistics by Tag中不包含匹配的标签 和“测试详细信息”在日志和报告。 ***
Examples: --tagstatexclude tag1
--tagstatcombine tags:name *
组合一个标签显示,可以使用--include的操作符
Examples:
--tagstatcombine requirement-*
--tagstatcombine tag1ANDtag2:My_name
--tagdoc pattern:doc *
给标签添加文档说明,可以用表达式匹配标签
Examples:
--tagdoc mytag:My_documentation
--tagdoc regression:*See*_http://info.html
--tagdoc owner-*:Original_author
--tagstatlink pattern:link:title *
添加标签的状态链接和说明,例如添加bug链接
Examples:
--tagstatlink mytag:http://my.domain:Link
--tagstatlink bug-*:http://tracker/id=%1:Bug_Tracker
--removekeywords all|passed|for|wuks|name:|tag: *
在测试日志中移除关键字
all: 删除所有关键字
passed:删除所有passed的测试用例的关键字
for: 删除for循环中的关键字
wuks:(保留原文,没研究出怎么生效)remove all but the last failing keyword inside BuiltIn.Wait Until Keyword Succeeds
name::移除表达式匹配出的关键字
Examples:
--removekeywords name:Lib.HugeKw
--removekeywords name:myresource.*
tag::删除指定测试用例中匹配出的关键字
Examples:
--removekeywords foo
--removekeywords fooANDbar*
--flattenkeywords for|foritem|name:|tag: *
展开关键字
for: 完全展开for循环关键字
foritem: 单独展开for循环的元素
name::展开匹配出的关键字
Examples:
`--removekeywords name:`
tag::展开指定测试用例中匹配出的关键字
Examples:
`--removekeywords tag:`
--listener class *
监听器
Examples:
--listener MyListenerClass
--listener path/to/Listener.py:arg1:arg2
--warnonskippedfiles
配置这个参数后会在控制台和测试日志中显示warning信息,默认值显示info信息
--nostatusrc
测试状态码设置为0,报错的代码会正弦显示
--runemptysuite
及时测试用例集为空也执行测试,不会报没有测试用例的错误
--dryrun
验证测试用例的语法,不会真正执行测试用例
-X --exitonfailure
有任何重要的测试用例Fail的时候,结束测试执行
--exitonerror
有任何语法错误或者引用错误时直接结束测试
--skipteardownonexit
结束测试的时候跳过teardown设置
--randomize all|suites|tests|none
随机执行测试
all:随机全部的 suites 和 tests
suites: 随机 suites
tests:随机 tests
none: 没有随机 (默认)
用语法 VALUE:SEED 可以设置默认的随机种子 SEED必须是整数
Examples:
--randomize all
--randomize tests:1234
--prerunmodifier class *
开始执行测试之前,先用程序编辑一下测试套件结构
--prerebotmodifier class *
在成成测试报告和日志之前,先用程序编辑一下测试结果的模型
--console type
设置控制台输出的方式
verbose:report every suite and test (default)
dotted: pass显示".",重要的fail显示“F”,普通fail显示”f“
quiet:除了errer和warning之外,没有输出
none: 不输出任何信息
-. --dotted
等效于--console dotted
--quiet
等效于--console quiet
-W --consolewidth chars
设置控制台信息的输出宽度,默认值”78“
-C --consolecolors auto|on|ansi|off
设置控制台输出的颜色
auto: 输出不重定向是使用颜色 (默认值)
on: 一直使用颜色
ansi: 适用于Windows
off:关闭颜色显示
注意颜色设置在 Windows 的 Jython中不是生效
-K --consolemarkers auto|on|off
显示顶层关键字标记
-P --pythonpath path *
引用库的路径
Examples:
--pythonpath libs/
--pythonpath /opt/testlibs:mylibs.zip:yourlibs
-E star:STAR -P lib/STAR.jar -P mylib.jar
-E --escape what:with *
转义 可用的转义符: amp (&), apos ('), at (@), bslash (), colon (:), comma (,), curly1 ({), curly2 (}), dollar ($), exclam (!), gt (>), hash (#), lt (
Examples:
--escape space:_ --metadata X:Value_with_spaces
-E space:SP -E quot:Q -v var:QhelloSPworldQ
-A --argumentfile path *
参数文件
Example file:
| --include regression
| --name Regression Tests
| # This is a comment line
| my_tests.robot
| path/to/test/directory/
Examples:
--argumentfile argfile.txt --argumentfile STDIN
-h -? --help
帮助文档
--version
查看当前版本
path r'c test.html',robot framework - robot命令参数解析相关推荐
- Robot Framework robot命令
在进行持续测试中,如果使用Robot Framework执行自动化用例,可以使用robot命令来执行用例,本文简单介绍robot命令的部分选项参数的用法. 目录 robot命令选项 robot使用实例 ...
- Robot Framework用户指南
Robot Framework用户指南 版本2.8.6 版权所有©诺基亚解决方案和网络2008-2014 根据知识共享署名3.0 Unported许可授权 目录 1开始 1.1简介 1.2版权和许可 ...
- Robot Framework(十八) 支持工具
5支持工具 5.1库文档工具(libdoc) libdoc是一种用于为HTML和XML格式的测试库和资源文件生成关键字文档的工具.前一种格式适用于人类,后者适用于RIDE和其他工具.Libdoc也没有 ...
- python3.7界面设计_基于selenium+Python3.7+yaml+Robot Framework的UI自动化测试框架
前端自动化测试框架 项目说明 本框架是一套基于selenium+Python3.7+yaml+Robot Framework而设计的数据驱动UI自动化测试框架,Robot Framework 作为执行 ...
- Robot Framework 自动化框架 - 定制自己的library
Robot 自动化框架内置提供了一些library,如OperatingSystem(包含一些常用的的文件操作关键字,如copy文件,创建目录),Telent,Screenshot,String,另外 ...
- Robot Framework + Selenium2Library环境下,结合Selenium Grid实施分布式自动化测试
最近一段时间,公司在推行自动化测试流程,本人有幸参与了自定义通用控件的关键字封装和脚本辅助编写.数据驱动管理.测试用例执行管理等一系列工具软件的研发工作,积累了一些经验,在此与大家做一下分享,也算是做 ...
- 自动化测试框架rf(Robot Framework)的安装
2022了,还没自己装过rf... 网上找了不少文章,或多或少都跟本地环境不太一下,作为新手,把安装过程做一次记录分享,仅供参考. 首先,帖一下我自己电脑的基本情况 下面就开始吧: 一.JAVA环境安 ...
- Robot Framework + Pywinauto 框架实现Windows GUI Automation
作者:Daly 出处:http://www.cnblogs.com/daly 欢迎转载,也请保留这段声明.谢谢! 最近刚给Windows GUI automation项目介的实现框架,总结记录一下, ...
- Robot Framework测试环境搭建(python3.7.2,pip在线安装)及RIDE的简单操作演示
Robot Framework测试环境搭建(python3.7.2,pip在线安装)和RIDE的简单操作演示 1.框架介绍 Robot Framework 框架是一个通用的测试框架(基于python) ...
最新文章
- 如何高效地爬取链家的房源信息(四)
- 引用(Reference)
- Core篇——初探Core的认证,授权机制
- Java如何通过WSDL文件来调用这些web service
- python的读取纯文本文件的几种模式
- 2017.3.24组合数学学习——容斥原理
- 对程序员非常重要的24个软技能
- lnmp化境开启pathinfo,支持tp5.0等访问
- 【Linux】Ubuntu下C语言访问MySQL数据库入门
- HttpUtility.UrlEncode 方法 (String) 对 URL 字符串进行编码 NET Framework 4.6 and 4.5
- http respose status code (记)
- 无法将文件“ “复制到“bin\*.*”。对路径“bin\*.*”的访问被拒绝。 解决方法
- [转]MVP+WCF+三层结构搭建项目框架
- 声学计算机软件,常用声学仿真软件汇总
- Excel 中VBA脚本的简单应用
- c++ 获取硬盘序列号serialnumber
- C++练习题:分数化简
- ES(二)| 安装ES、Kibana、IK分词器、拼音分词器(自动补全)
- 如何隐藏QDockWidget的标题栏
- 论人类思考时的贝叶斯过程
热门文章
- base cap 分布式_干货分享:基于本地消息表的分布式事务解决方案总结
- html计算器_学习HTML、CSS和JavaScript的最佳方法是什么?
- 怎么用python编程前二n-1项的等差数列的和_python 等差数列末项计算方式
- python 当前文件路径获取方式_Python获取当前文件路径
- 线性分组码的最小汉明距为6_第二章 线性代数
- 关于C生成的汇编与C++生成的汇编在函数名称上的差异
- JavaScript面试的完美指南(开发者视角)
- 【算法】LeetCode算法题-Remove Duplicates from Sorted Array
- ELK 分析 nginx access 日志
- 字符与编码(编码转换)