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.0b35

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.0b35
File Size Uploaded Provenance Actions
testtrain_pytest_allure-1.0.0b35.tar.gz 26.2 kB With provenance Details for testtrain_pytest_allure-1.0.0b35.tar.gz

Built distribution (wheel)

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

Total release size: 36.3 kB

Release files / testtrain_pytest_allure-1.0.0b35.tar.gz

Download URL testtrain_pytest_allure-1.0.0b35.tar.gz
Size 26.2 kB
Tags Source
SHA-256 checksum
How to use checksums
f42ea6c519d70510b59802a69a3c94966c84b6ca82623e0c81b4cd1150ed53c6
BLAKE2b-256 checksum
How to use checksums
90129d9bcf49564b1fa43c8005fb554f43a1a4df84e8654824c0687c63acef88
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 16, 2026.

Transparency log

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

Download URL testtrain_pytest_allure-1.0.0b35-py3-none-any.whl
Size 10.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
59b99770983422501ab3570de352078ad3114b73605a6864122c4a849af7f9e4
BLAKE2b-256 checksum
How to use checksums
c9519575b75557cd54ed4d23d88b0c86cb30842eaa4c8aa3050941fa9ce7d1ac
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 16, 2026.

Transparency log

Security for testtrain-pytest-allure 1.0.0b35

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.0b35.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 16, 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