Skip to main content

robotframework-allurevisitor

PyPI version Python versions License: Apache-2.0

Generate Allure input files from Robot Framework results. It is an offline alternative to the allure-robotframework listener: instead of hooking into a live test run, it post-processes an existing Robot Framework output.xml via Robot Framework's ResultVisitor API and writes the same *-result.json / *-container.json / *-attachment.* files using the official allure-python-commons engine.

This is handy when you already have an output.xml (from CI, a rerun, or a pabot run) and want an Allure report without re-running the tests.

Installation

pip install robotframework-allurevisitor

This installs the rf-allure console script (with allurevisitor as an alias). Rendering the Allure report additionally requires the Allure CLI.

Requirements

  • Python >=3.13
  • uv for working on the project from source

From source

uv sync

Usage

Command line (rf-allure, with allurevisitor as an alias):

uv run rf-allure path/to/output.xml -o allure-results --clean

Then render the report with the Allure CLI:

allure serve allure-results

Programmatic:

from robotframework_allurevisitor import generate

generate("output.xml", "allure-results", clean=True)

CLI options

Option Description
sources One or more output.xml files or globs (positional).
-o, --output Results directory (default allure-results).
--clean Remove existing files in the results directory first.
--thread Thread label, e.g. a pabot worker id (drives the Timeline view).
--issue-pattern Pattern turning issue tags into Allure issue links.
--link-pattern Pattern turning link tags into Allure links.

What gets converted

  • Suites → containers, with Suite Setup/Teardown recorded as the container's befores/afters.
  • Tests → results, with parentSuite/suite/subSuite labels from the test full name, framework/language/host (and optional thread) labels, tags mapped to labels/links (allure.* tags, severity), and a stable historyId = md5(full_name).
  • Keywords and control structures (FOR/IF/WHILE/TRY/…) → nested steps, with keyword assignment in the step name and arguments as step parameters.
  • Status: PASS→passed, SKIP/NOT RUN→skipped, FAIL→failed, and library/import/syntax/timeout errors → broken.
  • Timestamps are taken from the result data (epoch ms), never wall-clock, so conversion is reproducible.
  • Log messages → HTML attachments folded into the owning step; embedded screenshots → binary attachments.

Reruns, merges, and pabot

Passing multiple sources combines them; because historyId is stable, repeated runs of the same test are grouped by Allure as retries with the latest attempt (by stop time) as the headline:

uv run rf-allure original.xml rerun.xml -o allure-results --clean

For a single, deduplicated last-wins result, pre-merge with Robot's own tooling and convert the merged file:

rebot --merge original.xml rerun.xml --output merged.xml
uv run rf-allure merged.xml -o allure-results --clean

For pabot, either convert the single merged output.xml, or convert each worker's file with a distinct --thread — but never both into the same results directory (identical historyId would inflate counts).

Allure's trend/history view additionally relies on copying the previous report's history/ directory into allure-results before allure generate; that is an Allure-tooling step, enabled by the stable historyId this tool produces.

Development

uv run pytest          # tests
uv run ruff check .    # lint
uv run ruff format .   # format

End-to-end test

tests/test_e2e_report.py runs the whole pipeline — Robot Framework → the packaged rf-allure CLI → a real Allure HTML report — and asserts the report's widgets/summary.json statistics and data/test-cases/ match the run. It is tagged with the e2e marker:

uv run pytest -m e2e          # only the end-to-end test
uv run pytest -m "not e2e"    # skip it (hermetic fast lane)

Generating the report needs an Allure CLI. The test resolves one automatically: it uses allure if on PATH, otherwise falls back to npx allure-commandline (which needs Node and Java). If neither is available it skips rather than failing. To install a generator:

# Option A: the standalone Allure CLI (https://allurereport.org/docs/install/)
# Option B: via npm (Java required)
npm install -g allure-commandline

The npx allure-commandline fallback downloads the package on first use.

See AGENTS.md for architecture and contribution notes.

Metadata

Release files for robotframework-allurevisitor 0.1.0

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

Source distribution (sdist)

Source distribution for robotframework-allurevisitor 0.1.0
File Size Uploaded
robotframework_allurevisitor-0.1.0.tar.gz 59.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for robotframework-allurevisitor 0.1.0
File Interpreter ABI Platform
robotframework_allurevisitor-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 74.7 kB

Release files / robotframework_allurevisitor-0.1.0.tar.gz

Download URL robotframework_allurevisitor-0.1.0.tar.gz
Size 59.4 kB
Tags Source
SHA-256 checksum
How to use checksums
90d7ce5990dba13e6e8e58fabc67edca0190915c442c4e8d433f0865eb23e746
BLAKE2b-256 checksum
How to use checksums
e275990067e4baf140db366cb883aacee908ac07ea6eb9077b5f29b795500e99
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / robotframework_allurevisitor-0.1.0-py3-none-any.whl

Download URL robotframework_allurevisitor-0.1.0-py3-none-any.whl
Size 15.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
99b9d771ae87828ce98312fc5dbb73e34736e8e192ab6fbd4f9605e0c64733bd
BLAKE2b-256 checksum
How to use checksums
feda458d83cd7f97771c77c1fc5463cd4575c42185a081fefcb3c7dca6890211
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

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