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 setup.py sdist bdist_wheel
pip install twine
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.2.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | eeee314797bb6e1ff29cefedc7e07822bb9c45c867e54a8f6d2aa482e3bd4d66 |
|
MD5 | f011965750844021d73138f3ff97a1c3 |
|
BLAKE2b-256 | e9c727a2075dc51b6d21399fe8e1c02b4e794e777227088b5ca22de070fe8b5c |
Close
Hashes for pytest_prometheus_pushgateway-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 356c5c1c8547a24a8f27e625954d1e9bd02e1d177bfacc8b274173d137fe8010 |
|
MD5 | dfaec1e37e01660ce4a4fb0e9e173bf6 |
|
BLAKE2b-256 | 1de735d830d920b6ac57d9b9d5cc08a7b4c908601eed337d16c91f82dc66ef53 |