Robot Framework Metrics Dashboard

简介: 介绍下面介绍一款Robot Framework(以下简称RF)测试指标的可视化Dashboard工具robotmetrics效果如下图所示:robot metrics安装使用工作原理使用RF的API读取RF的输出文件output.

介绍

下面介绍一款Robot Framework(以下简称RF)测试指标的可视化Dashboard工具robotmetrics
效果如下图所示:

img_693ab61e63e08ebc3b2d690535cf78f2.png
robot metrics

安装使用

工作原理

  1. 使用RF的API读取RF的输出文件output.xml
  2. 使用API获取Suite, Test Case, Keyword, Status, Start Time, End Time以及Elapsed time值
  3. 使用BeautifulSoup库将数据生成html 报告

在工程中使用

  1. github仓库中下载robotmetrics.py文件
  2. robotmetrics.py文件拷贝到工程项目中
  3. 安装beautifulsoup
    pip install beautifulsoup4
  4. 执行robotmetrics.py文件
案例1:`robotmetrics.py`文件与`output.xml`文件在同目录
python robotmetrics.py

案例2:指定`output.xml`文件路径
python robotmetrics.py -inputpath .\Result\

案例3:指定文件名称

python robotmetrics.py -inputpath .\Result\ -output voutput.xml -report vreport.html -log vlog.html 
  1. Robot Framework指标报告metric-timestamp.html会生成在指定的目录中
  2. 邮件会将指标文件metric-timestamp.html发送到配置的收件人邮箱

配置

在指标中忽略一些不需要的库关键字

  • robotmetrics.py文件中将不需要的关键字库添加到元组对象ignore_library
  • 在指标报告中,关键字FOR, FORITEM会被忽略
  • 以下是被忽略关键字的库
ignore_library = [
 'BuiltIn',
 'SeleniumLibrary',
 'String',
 'Collections',
 'DateTime',
] 

你可以添加新的忽略库,如RequestsLibrary, AppiumLibrary

总结

适当的美化测试报告信息,可以更好的表达测试信息。
如有问题,可以通过以下邮件联系。

img_8ae1f5276d7eeeb22fbd40826e6c06cf.gif
wywincl522@gmail.com
目录
相关文章
|
8月前
|
测试技术
一个 ABAP Development Tool 自定义 service endpoint 的测试工具
一个 ABAP Development Tool 自定义 service endpoint 的测试工具
41 0
|
10月前
|
Java 测试技术 API
AWS SNS(Amazon Simple Notification Service
AWS SNS(Amazon Simple Notification Service)是一项托管式消息传递服务,可以帮助开发人员向多个终端(如移动设备、电子邮件、SMS、HTTP、SQS 队列等)发送通知和消息。SNS 可以帮助开发人员构建高度可伸缩和可靠的应用程序,同时支持广泛的消息协议和 API。
765 2
|
Kubernetes Linux 容器
Kubernetes CKS【13】---Microservice Vulnerabilities - Container Runtime Sandboxes
Kubernetes CKS【13】---Microservice Vulnerabilities - Container Runtime Sandboxes
Kubernetes CKS【13】---Microservice Vulnerabilities - Container Runtime Sandboxes
|
消息中间件 人工智能 Prometheus
在 Intenseye,为什么我们选择 Linkerd2 作为 Service Mesh 工具(Part.2)
在 Intenseye,为什么我们选择 Linkerd2 作为 Service Mesh 工具(Part.2)
124 0
在 Intenseye,为什么我们选择 Linkerd2 作为 Service Mesh 工具(Part.2)
|
监控 负载均衡 Kubernetes
在 Intenseye,为什么我们选择 Linkerd2 作为 Service Mesh 工具(Part.1)
在 Intenseye,为什么我们选择 Linkerd2 作为 Service Mesh 工具(Part.1)
326 0
在 Intenseye,为什么我们选择 Linkerd2 作为 Service Mesh 工具(Part.1)
An example of EXPORT / IMPORT usage - in office integration and odata metadata model cache
An example of EXPORT / IMPORT usage - in office integration and odata metadata model cache
An example of EXPORT / IMPORT usage - in office integration and odata metadata model cache
|
Web App开发 机器人 测试技术
Robot Framework使用技巧
1、变量的使用 变量可以在命令行中设置,个别变量设置使用--variable (-v)选项,变量文件的选择使用--variablefile (-V)选项。通过命令行设置的变量是全局变量,对其所有执行的用例都有效。
1350 0
|
机器人 Python 数据格式
Robot Framework's built-in tool:libdoc
Libdoc是Robot框架的内置工具之一,用于生成HTML和XML格式的测试库和资源文件的关键字文档,使用起来我感觉非常的灵活方便。 General Usage 语法使用 python -m robot.
1328 0