pytest-google-chat
Notify google chat channel for test results
🧰 Installation
You can install pytest-google-chat via pip from PyPI:
$ pip install pytest-google-chat
📖 Usage
In order to use this plugin, you need to provide the command line flag --google-chat and a valid goggle chat webhook.
The webhook, as all the other parameters, can be provided as a command line argument, as a value inside a config file or as an environment variable.
Command line options
| Option | Description | Default value |
|---|---|---|
--google-chat |
Enable the plugin (required) | This doesn't need a value |
--gc-webhook |
The webhook to send notifications to. Important: Use double or single quotes for the value |
None |
--report-link |
The link to the report | None |
--report-title |
The title of the report | None |
--report-subtitle |
The subtitle of the report | None |
--gc-fail-image |
The url of an image to use when the test fails | None |
--gc-success-image |
The url of an image to use when the test succeeds | None |
--gc-config |
The path to the config file | None |
Using a config file
[GOOGLE-CHAT]
gc_webhook=https://chat.googleapis.com/v1/spaces/AAAA7GkHUoE/messages?key=XXXX&token=YYYY
report_link=https://link.to.report
report_title=My Report
report_subtitle=My Report Subtitle
gc_fail_image=https://link.to.image
gc_success_image=https://link.to.image
Using environment variables:
REPORT_TITLE="My Report" pytest --google-chat --gc-webhook=https://....
❗NOTE All previous methods can be used combined. The order of precedence is: command line options > config file > environment variable.
Contributing
Contributions are very welcome. Tests can be run with tox, please ensure the coverage at least stays the same before you submit a pull request.
License
Distributed under the terms of the MIT license, "pytest-google-chat" is free and open source software.
Issues
If you encounter any problems, please file an issue along with a detailed description.
This pytest plugin was generated with Cookiecutter along with @hackebrot's cookiecutter-pytest-plugin template.
Metadata
Release files for pytest-google-chat 0.4.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pytest_google_chat-0.4.4-py3-none-any.whl | Python 3 | none | any | Details for pytest_google_chat-0.4.4-py3-none-any.whl |
Release files / pytest_google_chat-0.4.4-py3-none-any.whl
| Download URL | pytest_google_chat-0.4.4-py3-none-any.whl |
|---|---|
| Size | 7.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f8284cc5be5647f794d186c9e6a136ebe9196f84f3ab855b254eb0336b634a5d
|
|
BLAKE2b-256 checksum How to use checksums |
ad8cd8ceab6d8073a4a6280f7786a35f8eea94780cf135bb2c4a770655e2337a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10
|
Security for pytest-google-chat 0.4.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.