Pytest report plugin for Zulip
Project description
pytest-prometheus-pushgateway
Pytest report plugin for Prometheus PushGateway
Allow to send reports test results to a Prometheus PushGateway.
installation
pip install pytest-prometheus-pushgateway
Configure via env var
PROMETHEUS_PUSHGATEWAY_URL=""
PROMETHEUS_PUSHGATEWAY_JOB=""
Basic Auth:
PROMETHEUS_PUSHGATEWAY_BASIC_AUTH="true"
PROMETHEUS_PUSHGATEWAY_USERNAME=""
PROMETHEUS_PUSHGATEWAY_PASSWORD=""
Optional:
PROMETHEUS_PUSHGATEWAY_METRIC_PREFIX=""
PROMETHEUS_PUSHGATEWAY_EXTRA_LABEL=""
Add labels via hook
def pytest_metrics_add_labels(session: Session, exitstatus: Union[int, ExitCode]) -> str:
return {"html_report": report_url}
Add option to send metrics
pytest --metrics
Dev
Change version
edit
pytest_prometheus_pushgateway/__init__.py
commit
git commit -m "v0.1.0"
tag
git tag v0.1.0
Build package
python -m build
twine upload dist/*
Test
Create endpoint on requestbin and add the url to PROMETHEUS_PUSHGATEWAY_URL to set_env fixture into conftest.py
Use the runner in Pycharm.
pytest test_pytest_prometheus.py::TestPrometheus
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
Close
Hashes for pytest-prometheus-pushgateway-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2dd742f7cc27e3bcde9a8063a24104a5c3cedf0ebaedb66f7b3cbc040c9cb57a |
|
MD5 | 772d950ea9556e46ec4362026607abd8 |
|
BLAKE2b-256 | fc78c3d90ad50c205aa5edef940b6d6e5f81dbbc559ab5f6a1fc72ac2fd2886d |
Close
Hashes for pytest_prometheus_pushgateway-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ece3febf2e0297be4efcec172114d4a46e0ca4ff50f17d6a16516c7933a71ef8 |
|
MD5 | 6afba8ade758c8c713cca3aa55df54c8 |
|
BLAKE2b-256 | 2d3b789c3e5cc4a3510885482e97b46109dbda9d72ab6489cac5484f2b5cf5a4 |