Skip to content

adiralashiva8/robotframework-metrics

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 (robot.result.model)
  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. Clone project or download here link

    git clone https://github.com/adiralashiva8/robotframework-metrics.git
    
  2. Copy rf_metrics_report_creator.py file to project (where output.xml file is available.)

    Note: output.xml file name having timestamp is recognized by Metrics Report

    output.xml, report.html and log.html need to be within same folder.

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

    pip install beautifulsoup4
    
  4. Execute rf_metrics_report_creator.py file

    python rf_metrics_report_creator.py
    
  5. RobotFramework Metrics Report rf_metrics_result.html file will be created in current folder


Sample Report:

DASHBOARD

Screenshot

Screenshot

Screenshot

SUITE METRICS

Screenshot

TEST METRICS

Screenshot

KEYWORD METRICS

Screenshot

ROBOT LOG

Screenshot

EMAIL STATISTICS

Screenshot

Screenshot


How to Ignore Library Keywords in Metrics Report

  • In rf_metrics_report_creator.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',
    ] 
    

Versions:

  1. V2.1 link

    Status: Beta

    1. Dashboard
    2. Suite Metrics
    3. Test Metrics
    4. Keyword Metrics
    5. Robot Logs
    6. Email
  2. V2.0 link

    Status: Stable

    1. Dashboard
    2. Suite Metrics
    3. Test Metrics
    4. Keyword Metrics
    5. Robot Logs
  3. V1.0 link

    Status: Stable

    1. Dashboard
    2. Test Metrics
    3. Keyword Metrics

Credits:

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

You are watching first HTML 'Metrics Report' in Robot framework.


About

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

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 8