PyReport is a lightweight reporting plugin for Pytest that provides concise HTML report
Project description
PyReport
Quick overview
PyReport is a lightweight reporting plugin for Pytest that provides concise HTML reports by parsing JunitXML test results
Pre-requisites
To be able to use this plugin you will need below dependencies that will be installed automatically with PyReport:
- Python >=3.7
- Jinja2
- Pytest
- matplotlib
- requests
- logstyle
Getting started
Installation
To start using PyReport please follow below instructions:
- Install
pytest-pyreport
plugin:
pip install pytest-pyreport==<version>
Report generation
-
Run tests using below command to generate pyreport.html file with test results:
pytest --junitxml=result.xml -o junit_family="xunit1" --pyreport
-
Run tests using below command if you want to send telegram notification:
pytest --junitxml=result.xml -o junit_family="xunit1" --pyreport --telegram-pyreport <chat id> <bot token>
- Prerequisites:
- You need your own Telegram bot, which can be easily created using Telegram instructions. You can take the “chat ID” and “bot token” from there.
- Prerequisites:
-
Run tests using below command if you want to check generated report on the server if it is available:
pytest --junitxml=result.xml -o junit_family="xunit1" --pyreport --telegram-pyreport <chat id> <bot token> --server <URL>
- Prerequisites:
- You need to run server beforehand. As an example using CI/CD tools like Jenkins or GitHub Actions
- Prerequisites:
Test results
- Once test run completed you should see
pyreport.html
file that auto generated by using above commands.
Open it and check the test results as shown in below presentation
Presentation
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pytest-pyreport-1.4.0.tar.gz
.
File metadata
- Download URL: pytest-pyreport-1.4.0.tar.gz
- Upload date:
- Size: 10.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fec9624502f69892dd5c3b5e07617314c606e91245a140db257d6e18eb7b2200 |
|
MD5 | 1707b2ae3ac835adfd83e4f963786e1b |
|
BLAKE2b-256 | c3bb024e85ba021532c6042bcbeca95aedeea64caa3c6b6fafe69cb28c0facf0 |
File details
Details for the file pytest_pyreport-1.4.0-py3-none-any.whl
.
File metadata
- Download URL: pytest_pyreport-1.4.0-py3-none-any.whl
- Upload date:
- Size: 10.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 98e312899abf457be4db96bb49f02bb7f84b86411525c1eccb51a9d3d33b24e6 |
|
MD5 | c302fad6afbb5e8fbc6d246ca3a2ce6e |
|
BLAKE2b-256 | 64bdd79d8d24db36ac6663af77354c07a4389e9cd8bdc95b609413885aa9792f |