Aim of this project is to create HTML report based on robot framework output.xml (To analyze TESTS, KEYWORDS in entire suite | test execution)
How it Works:
- Read output.xml file (which will be created after script execution)
- Get Test Case Name (test tag) , Keyword Name (kw tag) , Start Time, End Time (status tag) values from output.xml file
- Convert data to html report using Beautifulsoap (Tabular format with sorting | pagination | search entire table | sort in search result)
How to use in project:
- Checkout the project
- Copy rf_metrics_report_creator.py and rf_metrics_executer.sh files to project (where output.xml file is available)
- Install beautifulsoap: pip install beautifulsoup4 (to create html report)
- Install lxml: pip install lxml (to read data from xml file)
- Execute rf_metrics_executer.sh file
- "RF_Metrics_Report" will be opened in new chrome tab
Sample Report:(Tabular format with sorting | pagination | search entire table | sort in search result )
Dashboard: (Consist of Keywords, Tests status charts)
Test Metrics: (Test Metrics - Sort by Elapsed time descending order)
Keyword Metrics: (Keywords Metrics - Sort by Elapsed time descending order)
How to Ignore Library Keywords in Keyword Metrics Report
- In rf_metrics_report_creator.py file add specific library keywords to ignore for tuple ignore_library
- In Keyword Metric report keywords with type value 'for' and 'foritem' are ignored
- Following library keywords are ignored in Keyword Metrics Report
ignore_library = [ 'BuiltIn', 'SeleniumLibrary', 'String', 'Collections', 'DateTime', ]
TODO:
- Show loading indicator while report is loading
- Show charts on page load
- Improve performance while converting .xml to .html using Thread | Multiprocess
- Read output.xml irrespective folder location
Intention of project is to help the guys who are monitoring there TESTS | KEYWORDS performance
- Checkout the project.
- Try within your project.
- Suggest your feedback | queries
- Let us improve this report together
You are watching first 'Performance Metrics HTML Report' in Robot framework :)