Robot Framework's built-in tool:libdoc

Libdoc是Robot框架的内置工具之一,用于生成HTML和XML格式的测试库和资源文件的关键字文档,使用起来我感觉非常的灵活方便。

General Usage

语法使用

python -m robot.libdoc [options] library_or_resource output_file
python -m robot.libdoc [options] library_or_resource list|show|version [names]

选项支持

-f, --format <html|xml>
    指定输出文档的格式,如果不使用此选项,则从输出文件的扩展名自动获取格式。如以下两种写法都是支持的:
      python -m robot.libdoc -f html SeleniumLibrary SL   或  
      python -m robot.libdoc  SeleniumLibrary SL.html

-F, --docformat <robot|html|text|rest>
    指定源文档格式,可能的值为Robot框架的文档格式:HTML、纯文本和reStructuredText。默认值可以在测试库源代码中指定,初始默认值为robot,支持2.7.5版本以上版本。

-N,--name <newname>
设置源库或资源的名称。

-V, --version <newversion>
  设置文档化库或资源的版本。测试库的默认值是从源代码获得的。

-h --help
    获取帮助文档

Examples

# 库或资源名称字母区分大小写
python -m robot.libdoc OperatingSystem OperatingSystem.html
python -m robot.libdoc --name MyLibrary Remote::http://10.0.0.42:8270 MyLibrary.xml
python -m robot.libdoc test/resource.html doc/resource_doc.html
python -m robot.libdoc SeleniumLibrary list >list.txt
jython -m robot.libdoc --version 1.0 MyJavaLibrary.java MyJavaLibrary.html
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值