Simple pytest plugin for generating and sending report to messengers.
Project description
pytest-chic-report
pytest-chic-report
is a plugin for pytest that allows you to generate test result summaries in Markdown format and send them to Slack or Teams channels.
Installation
You can install pytest-chic-report
via pip from PyPI.
pip install pytest-chic-report
Usage
Adding Command Line Options
The plugin adds several command line options to customize the reports:
--summary
Print a summary in the terminal (enabled by default).--suite-name
Specify the name of the test suite (default: "Regression").--whois
Specify the name of the user who triggered the tests.--verify-ssl
Enable TLS certificate verification.--slack-webhook
Specify the webhook URL for Slack to send the report.--teams-webhook
Specify the webhook URL for Teams to send the report.--include-failed
Include a template of failed tests in the message.--include-errors
Include a template of error tests in the message.--include-all-tests
Include a template of all tests in the message.
Example Usage:
pytest --slack-webhook https://hooks.slack.com/services/XXXXX/XXXXX/XXXXX
Report Format
The report is generated in Markdown format and sent to the specified channel, featuring color-coded test results:
- green ✅ - all tests passed
- red ❌ - at least one test failed or error
- yellow ⏸️ - all tests skipped
Example Report
--------- Suite Summary ---------
Suite name: Regression
Passed amount: 7
Failed amount: 1
Skipped amount: 1
Xfailed amount: 4
Xpassed amount: 2
Total tests: 15
Total duration: 0.02 seconds
Successful tests: 47 %
From: Linux-6.8.0-47-generic-x86_64-with-glibc2.39
Show less
Sent by Anonymous | Today at 10:32 AM
TODO:
- Implement xdist logic for parallel test execution.
Project details
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_chic_report-2.0.2.tar.gz
.
File metadata
- Download URL: pytest_chic_report-2.0.2.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b87ffb2c557b2f95d40f351e73417245c23d4e9a2cfa49d361c9ce04fe359991 |
|
MD5 | aae07cd757fa7badaa1b71191b43f942 |
|
BLAKE2b-256 | 2ae09c65afd5ac974a624300a9f1b62e29a49c76db7cd35e8a8c337189ebe759 |
File details
Details for the file pytest_chic_report-2.0.2-py3-none-any.whl
.
File metadata
- Download URL: pytest_chic_report-2.0.2-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c210dfa0e040078445987bf60a31ec9bf4e57eb82e16896a854f3ec8b07340d |
|
MD5 | f50d9dcea70d5defb720b12d45a12cb9 |
|
BLAKE2b-256 | 4ef6d2951f3db028bba8ec3c86715664934dc79875165065b56340085e14227b |