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

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

Built distribution (wheel)

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

Total release size: 36.5 kB

Release files / testtrain_pytest_allure-1.0.0b36.tar.gz

Download URL testtrain_pytest_allure-1.0.0b36.tar.gz
Size 26.4 kB
Tags Source
SHA-256 checksum
How to use checksums
0ed52c26422f694e0c0e185cccc2154d54d57ff15ed4dbe1c0914d9f8c310de0
BLAKE2b-256 checksum
How to use checksums
1bd54a044de1d26385a51b62bdd1adba2166d6fce398238c39259c05924b346c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 4, 2026.

Transparency log

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

Download URL testtrain_pytest_allure-1.0.0b36-py3-none-any.whl
Size 10.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e6dc254d9926c06146c8d8345c49da771f213284bfa087ec1b8d401b838e96c4
BLAKE2b-256 checksum
How to use checksums
bc5d4f173375f2583d1324a387c04d4a436b43fbb91291549bb401f9d3bb4257
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 4, 2026.

Transparency log

Security for testtrain-pytest-allure 1.0.0b36

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.0b36.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 Nov 4, 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