Pytest to Slack reporting plugin
Project description
pytest-slack
Pytest to Slack reporting plugin
Free software: MIT license
Documentation: https://pytest-slack.readthedocs.io.
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 follwoing 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:
Passed test:
$ 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:
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
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
Hashes for pytest_slack-2.0.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5f83f1273a574f4fd51e7178c355dd7237291bdf5c07664f6c0d40858da433a |
|
MD5 | 48027dc31466541a064a6b162660cccf |
|
BLAKE2b-256 | b619fb5340cb647eb9eaf3635012608b5778e737ce5b3b9cc49f0252643c010c |