Generate Allure input files from a Robot Framework output.xml — an offline alternative to the allure-robotframework listener.
Project description
robotframework-allurevisitor
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/subSuitelabels from the test full name,framework/language/host(and optionalthread) labels, tags mapped to labels/links (allure.*tags, severity), and a stablehistoryId = 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file robotframework_allurevisitor-0.1.0.tar.gz.
File metadata
- Download URL: robotframework_allurevisitor-0.1.0.tar.gz
- Upload date:
- Size: 59.4 kB
- Tags: Source
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
90d7ce5990dba13e6e8e58fabc67edca0190915c442c4e8d433f0865eb23e746
|
|
| MD5 |
1f37024e1688cd34833f5d7debb37dad
|
|
| BLAKE2b-256 |
e275990067e4baf140db366cb883aacee908ac07ea6eb9077b5f29b795500e99
|
File details
Details for the file robotframework_allurevisitor-0.1.0-py3-none-any.whl.
File metadata
- Download URL: robotframework_allurevisitor-0.1.0-py3-none-any.whl
- Upload date:
- Size: 15.3 kB
- Tags: Python 3
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
99b9d771ae87828ce98312fc5dbb73e34736e8e192ab6fbd4f9605e0c64733bd
|
|
| MD5 |
2525cbacb8df37733d38b1da40c877dc
|
|
| BLAKE2b-256 |
feda458d83cd7f97771c77c1fc5463cd4575c42185a081fefcb3c7dca6890211
|