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

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

Built distribution (wheel)

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

Total release size: 36.3 kB

Release files / testtrain_pytest_allure-1.0.0b34.tar.gz

Download URL testtrain_pytest_allure-1.0.0b34.tar.gz
Size 26.2 kB
Tags Source
SHA-256 checksum
How to use checksums
e07968e7e6156a41f9974cb239571ed88e5a6e83578f00b1da5a497cbdf73633
BLAKE2b-256 checksum
How to use checksums
fd8e2dc433af176ca17fc72809fee642c85ef8c52cb53a8d5cbfb90c9e904d32
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.0b34-py3-none-any.whl

Download URL testtrain_pytest_allure-1.0.0b34-py3-none-any.whl
Size 10.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5daa7f605ebfab43d5976e6fd4c3945aa6e2c385363ee52f45298519048f0bd9
BLAKE2b-256 checksum
How to use checksums
7885522b400a4e38b77b6f025673f086e8fb9b8d467ea35936d81e3f6323384b
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.0b34

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