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="{'test':'value','test1':'value1'}"
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.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 85efea36fd976432bfb13c19b4a3450b475694db817196d386129a1b95a7ac17 |
|
MD5 | 7fe6e79f9cfb6471d138cb30e095c4d2 |
|
BLAKE2b-256 | 980bce04ee5c2179734d822a8a637cf760fc6804efb84045732d7bb151f48ebf |
Close
Hashes for pytest_prometheus_pushgateway-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d6bc57a3aa1a7dddb678ce722fdbcac8f2821f23a3ca3e6b52b692ccc5188464 |
|
MD5 | b04e5f5adb24a7318ee77f1ed98b582a |
|
BLAKE2b-256 | f809455efa33860a06f1855edf3a040c7f5e4fc3cdab0b9269f768be3e9ca76a |