Skip to content

adiralashiva8/robotframework-metrics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

83 Commits
 
 
 
 
 
 

Repository files navigation

Robot Framework Metrics Report

Creates HTML Metrics report based on robotframework output.xml


How it Works:

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

How to use in project:

  1. Download robotmetrics.py from here link

    Repo has some extra files (.html and .xml for testing) - I suggest to download from link

  2. Copy robotmetrics.py file to project

  3. Install beautifulsoup: (to create html report - one time activity)

    pip install beautifulsoup4
    
  4. Execute robotmetrics.py file

    Case 1: robotmetrics.py is copied where output.xml is available

    python robotmetrics.py
    

    Case 2: Specify output.xml file path. (When .xml and .html file names are same)

    python robotmetrics.py -inputpath .\Result\
    

    Case 3: Specify file name. (When .xml and .html file names are altered)

    python robotmetrics.py -inputpath .\Result\ -output voutput.xml -report vreport.html -log vlog.html
    
  5. RobotFramework Metrics Report metric-.html file will be created in current folder | -inputpath if specified


Sample report link


How to Ignore Library Keywords in Metrics Report

  • In robotmetrics.py file add specific library keywords to tuple ignore_library to ignore in report
  • 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',
    ] 
    

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

About

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

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 8