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

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

Built distribution (wheel)

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

Total release size: 36.3 kB

Release files / testtrain_pytest_allure-1.0.0b32.tar.gz

Download URL testtrain_pytest_allure-1.0.0b32.tar.gz
Size 26.2 kB
Tags Source
SHA-256 checksum
How to use checksums
2e94a2d26cd0bb9441faacb7272a846b2004f83c416504d39107ac1f8a4f2bc6
BLAKE2b-256 checksum
How to use checksums
c92a6d396d0fe6f5dd877a9b1c40615d15772b3b4e167a70182b200b0af233bf
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 Aug 10, 2026.

Transparency log

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

Download URL testtrain_pytest_allure-1.0.0b32-py3-none-any.whl
Size 10.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9ca1851904fd215e7fb28f3a32c090e41d904122cb8ddf3941e1272e0307cba9
BLAKE2b-256 checksum
How to use checksums
c73402517a279f7b8182adb1a72bfdc627460cb6600494c6b563ecc6cc60aa75
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 Aug 10, 2026.

Transparency log

Security for testtrain-pytest-allure 1.0.0b32

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.0b32.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 Aug 10, 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