Skip to main content

Pytest to Slack reporting plugin

Project description

pytest-slack

https://img.shields.io/pypi/v/pytest-slack.svg https://img.shields.io/travis/pytest-dev/pytest-slack.svg https://codecov.io/gh/pytest-dev/pytest-slack/branch/master/graph/badge.svg Documentation Status Updates

Pytest to Slack reporting plugin

Requirements

  • Requests

Installation

You can install “pytest-slack” via pip:

$ pip install pytest-slack

Usage

  • Setup slack hook

  • Use this plugin by running pytest normally and use the following options to customize report:

>>> slack:
  --slack_channel=SLACK_CHANNEL
                        Set the channel name to report
  --slack_hook=SLACK_HOOK
                        Used for reporting to slack
  --slack_report_link=SLACK_REPORT_LINK
                        Set the report link
  --slack_username=SLACK_USERNAME
                        Set the reporter name
  --slack_timeout=SLACK_TIMEOUT [DEFAULT = 10s ]
                        Set the timeout for sending results in seconds
  --slack_success_emoji=SLACK_SUCCESS_EMOJI [default = :thumbsup:]
                        Set emoji for a successful run
  --slack_failed_emoji=SLACK_FAILED_EMOJI [default = :thumbsdown:]
                        Set emoji for a failed run
  --slack_success_icon=SLACK_SUCCESS_ICON [default = None]
                        Set icon (a url) for a successful run. Overrides SLACK_SUCCESS_EMOJI
  --slack_failed_icon=SLACK_FAILED_ICON [default = None]
                        Set icon (a url) for a failed run. Overrides SLACK_FAILED_EMOJI

Example

$ pytest tests –slack_hook=https://hooks.slack.com/services/… –slack_channel=test_report_channel –slack_username=”Regression testing results”

All kind of problems:

https://raw.githubusercontent.com/pytest-dev/pytest-slack/master/img/failed.png

Passed test:

https://raw.githubusercontent.com/pytest-dev/pytest-slack/master/img/success.png

$ pytest tests –slack_hook=https://hooks.slack.com/services/… –slack_channel=test_report_channel –slack_username=”Regression testing results” –slack_report_link=http://any_address

Passed test with link:

https://raw.githubusercontent.com/pytest-dev/pytest-slack/master/img/success_link.png

Issues

If you encounter any problems, please file an issue along with a detailed description.

History

1.0.1 (2019-04-18)

  • First release on PyPI.

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-slack-2.1.1.tar.gz (10.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytest_slack-2.1.1-py2.py3-none-any.whl (5.0 kB view details)

Uploaded Python 2Python 3

File details

Details for the file pytest-slack-2.1.1.tar.gz.

File metadata

  • Download URL: pytest-slack-2.1.1.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.7

File hashes

Hashes for pytest-slack-2.1.1.tar.gz
Algorithm Hash digest
SHA256 0229acf52d86649245fda279b1412d076327f3c03cb0e00805ec2898602aaa20
MD5 47088376d029780e36e6705510b57fe9
BLAKE2b-256 bdcc1614e95ae4e2aa8f3ce3ab487e81da048b6c4af5186582f732903450b4cd

See more details on using hashes here.

File details

Details for the file pytest_slack-2.1.1-py2.py3-none-any.whl.

File metadata

  • Download URL: pytest_slack-2.1.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.7

File hashes

Hashes for pytest_slack-2.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 3bca348ba928a3143177f62c65c4a6c0a16592932677fe3ac558aef5419cac4e
MD5 e1779c56d7fdcedfb880ac641ee7efe3
BLAKE2b-256 8a95c4dbb0a5f136033233a470973a268f5f1de1c30f50392d4254df9a8b8236

See more details on using hashes here.

Supported by

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