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).
  • --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: passed
  • red: failed
  • yellow: not run

Example Report

--------- Suite Summary ---------
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 %
Platform: Linux-6.8.0-47-generic-x86_64-with-glibc2.39

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

pytest_chic_report-2.0.1.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

pytest_chic_report-2.0.1-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pytest_chic_report-2.0.1.tar.gz
  • Upload date:
  • Size: 5.4 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.1.tar.gz
Algorithm Hash digest
SHA256 9f401a1df03c816893050b450aacbe2a293d2de406478bf59c170e1f9962571b
MD5 a9b36a20b6b1f69782972d8faa5897ca
BLAKE2b-256 3408b12de1dcf69fe1d81376d6424132e1680c996b3133f3cd1e12b68100c696

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pytest_chic_report-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3ed17da6f3905de31a9f9fe3560e73e81e532d212d1f22e3419a2a9add555ad1
MD5 74fd5b5190acbfa34a447748e11ffeef
BLAKE2b-256 1355814b70303b4317ab79356abc1b69f24908a40dbda4a07ba9e843d2129d4c

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