Skip to main content

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

Note: This does not work with the pytest-xdist plugin.

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

pytest_chic_report-2.0.3.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

pytest_chic_report-2.0.3-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file pytest_chic_report-2.0.3.tar.gz.

File metadata

  • Download URL: pytest_chic_report-2.0.3.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for pytest_chic_report-2.0.3.tar.gz
Algorithm Hash digest
SHA256 c0e9da0be7895ad7f4e16f7cab74ed7c1c989bfb4f969828568f3f4f3014ea65
MD5 0b6d7f8e6dcf4b95e503f3b78836ce4e
BLAKE2b-256 8c2a63e8544ee1147f09ee638b6641a2d75a6365ab06e0af1ef05f93ede26350

See more details on using hashes here.

File details

Details for the file pytest_chic_report-2.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for pytest_chic_report-2.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2b28a77bc77d94a8f5c712b7ed689e2f697b245b36385f425f96803a6e157f75
MD5 b0f4f0cd043da0295f785764f2cfad01
BLAKE2b-256 3b9bc1751cea0d84b7755822dabba449a3b20829cb21f6c3ed34d46414f196da

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page