Skip to main content

pytest-otr

pytest plugin that streams test results in the Open Test Reporting (OTR) event-based XML format, maintained by the JUnit team.

Usage

pytest --otr-report events.xml

Or stream events live to a consumer on 127.0.0.1 (e.g. a listener daemon):

pytest --otr-socket 8080

Validate with the official CLI:

java -jar open-test-reporting-cli-0.2.7-standalone.jar validate events.xml
java -jar open-test-reporting-cli-0.2.7-standalone.jar html-report --output report.html events.xml

Status mapping

pytest outcome OTR status notes
passed SUCCESSFUL
skipped SKIPPED reason = skip reason
failed (call) FAILED reason = longreprtext
failed (setup/teardown) ERRORED reason = longreprtext
xfail (failed as expected) SKIPPED reason = "xfail: ..."
xpass (unexpected pass) FAILED reason = "XPASS: ..."
xpass with strict=True FAILED reason = "[XPASS(strict)] ..."
collection error ABORTED container-level

Captured stdout/stderr of each test is attached as <output> elements under <attachments>.

Hierarchy: root session → file container → class container → test.

Known limitations

  • Schema is still 0.2.x; output targets events-0.2.0.xsd.
  • --otr-socket connects once at session start and fails with a warning (no report) if the consumer is not listening.

Development

pip install -e ".[test]"
python -m pytest tests/

License

Apache-2.0. OTR is a format specification of the JUnit team (ota4j-team/open-test-reporting), Apache-2.0.

Metadata

Release files for pytest-otr 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pytest-otr 0.2.0
File Size Uploaded Provenance
pytest_otr-0.2.0.tar.gz 13.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pytest-otr 0.2.0
File Interpreter ABI Platform
pytest_otr-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 23.5 kB

Release files / pytest_otr-0.2.0.tar.gz

Download URL pytest_otr-0.2.0.tar.gz
Size 13.7 kB
Tags Source
SHA-256 checksum
How to use checksums
bdc4e27a59ca59763bfc5315a641442ff7b11df84e1965420b359d5d4b57f719
BLAKE2b-256 checksum
How to use checksums
32cf4852842f073bebfba7d6df426e39eb85131c5e4a41dbda5137d0600b5f44
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.7

Release files / pytest_otr-0.2.0-py3-none-any.whl

Download URL pytest_otr-0.2.0-py3-none-any.whl
Size 9.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a875e1231e8c8907e789bd98c39d93c5d61dca83fc3e4235b464c2a179965138
BLAKE2b-256 checksum
How to use checksums
019d4b6b8ac5eb28ca25fab1b2021904e42c4bb5a49ca155969e5f96232339f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.7

Security for pytest-otr 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page