pytest-metrics

Custom metrics report for pytest


Keywords
pytest, py, test, metrics, dashboard, pytest-metrics, pytest-plugin, python
License
MIT
Install
pip install pytest-metrics==0.4

Documentation

pytest-metrics

Plugin to create dashboard view report for pytest (no code changes)

PyPI version Downloads PRs Welcome Maintenance Open Source Love png1


Sample Report - link

Best viewed in desktop


Why Pytest-Metrics

  • Dashboard view of results
  • Suite/Class level statisitics
  • Search and Pagination of results
  • Export results to csv, excel and can save as pdf
  • Easy to share results
  • Free to use

How it works:

  • Get execution details using hooks link
  • Create pytest-metrics report &
  • Saves in current folder

How to use in project:

  1. Install pytest-metrics

    Case 1: Using pip

    pip install pytest-metrics
    

    Case 2: Using setup.py (clone repo and run command in root)

    python setup.py install
    

    Case 3: Install from git (changes in master)

    pip install git+https://github.com/adiralashiva8/pytest-metrics
    
  2. Enable metrics-report while executing tests

    pytest --menable=True
    

    Default value of --menable is False

  3. Report with created after execution

Note:

  • Customize logo by using following command

    pytest --menable=True --mlogo="https://www.mycompany/logo.png"
    
  • Append timestamp to metrics report

    pytest --menable=True --mtimestamp=True
    

Thanks for using pytest-metrics!

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


Found issue report here


Credits

Pytest-metrics uses above items to create report


Special Thanks To

Feedback & Suggestions


⭐️ repo if you like it

Inspired from robotframework-metrics