1 Star 0 Fork 0

YongboTest/robotframework-metrics

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

Robot Framework Metrics Report

Creates awesome HTML (dashboard view) report by parsing robotframework output.xml file

PyPI version Downloads PRs Welcome Maintenance Open Source Love png1 Gitter


  • Sample Report link
  • What's new in _v3.1.2 link
  • Source Code used to parse output.xml in metrics report link

How it Works:

  1. Read output.xml file using robotframework API
  2. Get Suite, Test Case , Keyword , Status and Elapsed time values
  3. Convert data to html report using Beautifulsoup

How to use in project:

  1. Install robotmetrics

    Case 1: Using pip

    pip install robotframework-metrics==3.1.2
    

    Case 2: Using setup.py (clone project and run command within root)

    python setup.py install
    

    Case 3: For latest changes use following command (pre-release or changes in master)

    pip install git+https://github.com/adiralashiva8/robotframework-metrics
    
  2. Execute robotmetrics command to generate report

    Case 1: No change in output.xml, log.html file name's and user is in same folder

    robotmetrics
    

    Case 2: Change in output.xml, log.html file name's And .xml and .html files are under 'Result' folder

    robotmetrics --inputpath ./Result/ --output output1.xml --log log1.html
    

    robotframework-metrics can parse multiple xmls at a time. Following is the command

    robotmetrics --inputpath ./Result/ --output "output1.xml,output2.xml" --log log1.html
    

    For more info on command line options use:

    robotmetrics --help
    
  3. RobotFramework Metrics Report metric-timestamp.html file will be created in current folder | -inputpath if specified

Note: From v3.1.4 users can specify custom_report_name instead of metrics-timestamp.html (changes in master)

robotmetrics -M regression_metrics.html

Customize Report

Specify Logo in Robotframework metrics:

  • Custom Logo : Customize your logo by using --logo command line option

    --logo "https://mycompany/logo.jpg"
    

How to Ignore Library Keywords in Metrics Report

  • Use command line options to ignore library keywords
    --ignore "Collections,Selenium2Library"
    
  • In Metric report, keywords with type value 'for' and 'foritem' are ignored
  • Following library keywords are ignored in Metrics Report
    ignore_library = [
     'BuiltIn',
     'SeleniumLibrary',
     'String',
     'Collections',
     'DateTime',
    ] 
    

Generate robotframework-metrics after execution

Execute robotmetrics command after suite or test execution as follows:

  • Create .bat (or) .sh file with following snippet

    robot test.robot &&
    robotmetrics [:options]
    

    && is used to execute multiple command's in .bat file

  • Modify robotmetrics command as required and execute .bat file

  • Robotframework metrics will be created after execution


*Performance Improvement (Beta) *

  • Do you feel robotmetrics command taking more time to capture metrics? Robotframework-metrics have ability to process metrics in parallel using gevent (which helps in saving time)
  • Step 1: Install gevent
  • Step 2: Execute robotmetrics command

Thanks for using robotframework-metrics!

  • What is your opinion of this report?
  • What’s the feature I should add?

If you have any questions / suggestions / comments on the report, please feel free to reach me at


Credits:

  1. Robotframework link
  2. Stackoverflow link
  3. Google charts link
  4. DataTable link
  5. BeautifulSoup link
  6. Jquery | JavaScript link
  7. Bootstrap link
  8. Icons8 link
  9. FontAwesome link

Note: Report uses above open source libraries for generating report and its not offline compatible


Special Thanks To:

Idea, Guidance and Support:

Contributors:

  1. Pekka Klarck [Author of robotframework]

    • Contributed source to get 'Test Case' name from keyword
    • Suggested to use robotframework api to parse output.xml content
  2. Ruud Prijs

    • Contributed source to use command line options for report
  3. Jesse Zacharias

    • Made robotmetrics installable (pip)
    • Contributed source to improve performance
  4. Bassam Khouri

    • Contributed source to use ArgParser
    • Contributed source to provide a human readable error if output.xml does not exist
  5. Francesco Spegni

    • Contributed source to parse multiple xml's
    • Fixed distorted image
  6. Sreelesh Kunnath

    • Contributed source to specify custom metrics file name (changes will be from v3.1.4)

Feedback:

  1. Mantri Sri
  2. Prasad Ozarkar
  3. Suresh Parimi
  4. Robotframework community users

STAR to appreciate us

MIT License Copyright (c) 2019 Shiva Prasad Adirala Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

Creates awesome HTML (dashboard view) report by parsing robotframework output.xml file 展开 收起
README
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/YongboTest/robotframework-metrics.git
git@gitee.com:YongboTest/robotframework-metrics.git
YongboTest
robotframework-metrics
robotframework-metrics
master

搜索帮助