qualflare-pytest
A native pytest plugin for Qualflare — captures results
directly from your pytest run: status, per-attempt retry history and flakiness,
steps, attachments, and author-facing metadata (labels, links, tags, priority,
custom parameters).
Without it, pytest results reach Qualflare through --junitxml, which carries
pass/fail, duration and a class name — no retry history, no attachments, no
metadata.
The plugin makes no network calls. It writes a report directory, and
qualflare-cli uploads it.
Install
pip install qualflare-pytest
Requires Python 3.9+ and pytest 7.0+. It registers itself on install — there is no
-p flag to add. pytest-xdist and pytest-rerunfailures are supported but
optional; the plugin works, and is tested, without either.
Quickstart
pytest
pip install qualflare-cli
qf login my-project "$QUALFLARE_TOKEN" --force
qf my-project collect ./qualflare-results
Configure it in pytest.ini, pyproject.toml or setup.cfg:
[pytest]
qualflare_environment = staging
qualflare_output_dir = qualflare-results
Every option and environment variable is in
docs/CONFIGURATION.md.
Parallel runs
pytest -n auto is supported and needs no configuration. Metadata attached in a
worker travels to the controller on the test report, and the controller writes one
report for the whole run. The plugin's own CI asserts that pytest and
pytest -n 2 produce the same report.
The xdist worker index is recorded as each case's shard index, so a distributed
run is attributed correctly without the record_property("shard", …) workaround
the JUnit path needs.
Enriching your tests
from qualflare_pytest import qualflare
def test_checks_out():
qualflare.label("feature", "checkout")
qualflare.link("https://example.com/issue/42", type="issue", name="QF-42")
qualflare.tag("smoke")
qualflare.priority("high")
with qualflare.step("add to cart"):
qualflare.parameter("sku", "widget")
qualflare.parameter("token", os.environ["TOKEN"], masked=True)
Markers become tags automatically, so a suite already using @pytest.mark.smoke
for selection gets that dimension in Qualflare with no code change. When
pytest-bdd is installed, Gherkin steps are recorded with their keyword and
location too.
Full reference in docs/METADATA-API.md.
Known limitations
xfailandxpassare flattened toskippedandpassed. Underxfail(strict=True)an unexpected pass is a failure in pytest but reads as an ordinary pass here.record_propertyis ignored. Usequalflare.parameter()orqualflare.label(), which do reach the report.- Captured stdout/stderr are not attached. Attach what you need explicitly.
Full details in docs/LIMITATIONS.md.
License
Apache-2.0 — see LICENSE.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file qualflare_pytest-0.1.1.tar.gz.
File metadata
- Download URL: qualflare_pytest-0.1.1.tar.gz
- Upload date:
- Size: 35.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
03208670d42a9a9cbacb37975e0e8ca0b5ff797a82dfaf842b9ef5580d1ab419
|
|
| MD5 |
4da61167a189468dc9f7217591fd25cb
|
|
| BLAKE2b-256 |
5cc77472cafcab81b432be5e9aca7cfd1a8d94c36fd66bae072860c1051c689a
|
Provenance
The following attestation bundles were made for qualflare_pytest-0.1.1.tar.gz:
Publisher:
release.yml on Qualflare/qualflare-pytest
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
qualflare_pytest-0.1.1.tar.gz -
Subject digest:
03208670d42a9a9cbacb37975e0e8ca0b5ff797a82dfaf842b9ef5580d1ab419 - Sigstore transparency entry: 2743188030
- Sigstore integration time:
-
Permalink:
Qualflare/qualflare-pytest@e0254a9af82ed86b015dd46afabd90321913abf2 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/Qualflare
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e0254a9af82ed86b015dd46afabd90321913abf2 -
Trigger Event:
push
-
Statement type:
File details
Details for the file qualflare_pytest-0.1.1-py3-none-any.whl.
File metadata
- Download URL: qualflare_pytest-0.1.1-py3-none-any.whl
- Upload date:
- Size: 30.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
99a4adc99de46387261adb1a511a13eae7fba7b4abbc350907754e722b37f08c
|
|
| MD5 |
db56aa183c99923a75ccb0f529413961
|
|
| BLAKE2b-256 |
6610a2f11b5cb8c26d790626b0f24d981bb72e4a27c8ac99f0db45a27b065cdc
|
Provenance
The following attestation bundles were made for qualflare_pytest-0.1.1-py3-none-any.whl:
Publisher:
release.yml on Qualflare/qualflare-pytest
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
qualflare_pytest-0.1.1-py3-none-any.whl -
Subject digest:
99a4adc99de46387261adb1a511a13eae7fba7b4abbc350907754e722b37f08c - Sigstore transparency entry: 2743188093
- Sigstore integration time:
-
Permalink:
Qualflare/qualflare-pytest@e0254a9af82ed86b015dd46afabd90321913abf2 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/Qualflare
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e0254a9af82ed86b015dd46afabd90321913abf2 -
Trigger Event:
push
-
Statement type: