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.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 480c2f0e9c2e6446dc29d011363d357d2e5439bb2bd165f148555e0d6f66cfde |
|
MD5 | 4a34b24d37ff8576bac2b43ac0d26646 |
|
BLAKE2b-256 | 5be08b19b668333d29ab0f86348836740c3b390384c62bb5e9ef2f6fe76e3557 |
Close
Hashes for pytest_prometheus_pushgateway-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f6361093096a0b851ad3bda8c3ed0270421e5c388d5015135c0444d38f53a6d0 |
|
MD5 | 5b229f2591ee21e4f0bdaadb6d8f4f9d |
|
BLAKE2b-256 | becf2d9a975cca042a47522072ac002fe8fcb59ddb09ef30cfd18f7421e63550 |