Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

testtrain-pytest-allure

A pytest plugin that streams Allure test results to Testtrain in real time using allure-python-commons hooks.

Each test result — including steps, parameters, attachments, and defect links — is posted to the Testtrain API immediately after the test finishes, with no file scanning required.

Installation

pip install testtrain-pytest-allure

Usage

pytest \
  --testtrain-url=http://localhost:3000 \
  --testtrain-auth-token=your-token \
  --alluredir=allure-results \
  --testtrain-run-id=testrun-id

The plugin activates automatically when all three --testtrain-* options are provided.

Environment variables

You can provide the Testtrain settings via environment variables instead of command-line options. The plugin prefers CLI options but will fall back to env vars when options are not given.

export TESTTRAIN_RUN_ID="your-run-uuid"
export TESTTRAIN_AUTH_TOKEN="your-token"
export TESTTRAIN_URL="https://testtrain.io" # Optional (defaults to https://testtrain.io)

Run pytest normally (use -s to show plugin logs):

pytest -k <one_test> -s

Options

Option Description
--testtrain-url Testtrain platform base URL
--testtrain-auth-token Bearer token for API authentication
--testtrain-run-id UUID of an existing testrun to report results to

How It Works

The plugin registers a listener into allure_commons.plugin_manager that implements the report_result hook. When Allure finalises a test (after teardown), the listener:

  1. Maps the TestResult object (status, steps, parameters, links) to the Testtrain API schema.
  2. Collects any in-memory attachment data captured during the test run.
  3. Sends everything to POST /api/tests (JSON or multipart when attachments are present).
  4. Retries up to 3 times on transient errors with exponential back-off.
  5. Stops the test session if all retries fail.

Development

cd plugins/testtrain-pytest-allure
uv sync
uv run pytest tests/

Metadata

Release files for testtrain-pytest-allure 1.0.0b33

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

Source distribution (sdist)

Source distribution for testtrain-pytest-allure 1.0.0b33
File Size Uploaded Provenance Actions
testtrain_pytest_allure-1.0.0b33.tar.gz 14.9 kB With provenance Details for testtrain_pytest_allure-1.0.0b33.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for testtrain-pytest-allure 1.0.0b33
File Interpreter ABI Platform Actions
testtrain_pytest_allure-1.0.0b33-py3-none-any.whl Python 3 none any Details for testtrain_pytest_allure-1.0.0b33-py3-none-any.whl

Total release size: 24.9 kB

Release files / testtrain_pytest_allure-1.0.0b33.tar.gz

Download URL testtrain_pytest_allure-1.0.0b33.tar.gz
Size 14.9 kB
Tags Source
SHA-256 checksum
How to use checksums
7c64be040d62906850ea74e8416110d96119b50fb4dadf9d8320d5d48fc38f44
BLAKE2b-256 checksum
How to use checksums
57f753d54a484445ecf191a32197d52920a15c5f28672a987c2db702aa49531f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 15, 2026.

Transparency log

Release files / testtrain_pytest_allure-1.0.0b33-py3-none-any.whl

Download URL testtrain_pytest_allure-1.0.0b33-py3-none-any.whl
Size 10.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5f0e17a666740d6201b323b5ee5cfedc93a5c1e55773437e81264b7e1f5d8cd8
BLAKE2b-256 checksum
How to use checksums
9d1efb30783674fd59637bb0fb9be5df4f6fe2e917ce8b169d8c947c553596e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 15, 2026.

Transparency log

Security for testtrain-pytest-allure 1.0.0b33

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for testtrain_pytest_allure-1.0.0b33.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 15, 2026.

Transparency log

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

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