Allure single html file builder
Tool to build allure generated folder into a single html file
What it's doing?
After run by console command, or by call from python code, it:
- Reads contents of allure-generated folder
- Creates server.js file, which has all the data files inside and code to start fake XHR server
- Patches index.html file, so it's using server.js and sinon-9.2.4.js (Taken from here), and could be run in any browser without --allow-file-access-from-files parameter of chrome browser
- Creates file complete.html with all files built-in in a single file
Requirements
- Python 3.6+
- You need to have your allure report folder generated (
allure generate './some/path/to/allure/generated/folder')
Installation
Install with pip
pip install allure-combine
or:
Install manually
- Clone repo
git clone git@github.com:MihanEntalpo/allure-single-html-file.git
cd allure-single-html-file
- Install requirements (actually there are only BeautifulSoup)
pip install -r ./requirements.txt
python setup.py install
Run as console script
If you have cloned repo, not installed module via pip, replace allure-combine with python ./allure_combine/combine.py in following commands:
- Create complete.html file inside the allure folder itself
allure-combine ./some/path/to/allure/generated/folder
- Create complete.html file inside specified folder:
allure-combine ./some/path/to/allure/generated/folder --dest /tmp
- Ensure that specified dest folder exists (create if not)
allure-combine ./some/path/to/allure/generated/folder --dest /tmp/allure-2022-05-05_12-20-01/result --auto-create-folders
- Remove sinon.js and server.js from allure folder after complete.html is generated:
allure-combine ./some/path/to/allure/generated/folder --remove-temp-files
- If html/json files what should be utf-8 is has broken encoding, ignore errors:
allure-combine ./some/path/to/allure/generated/folder --ignore-utf8-errors
Import and use in python code
pip install allure-combine
from allure_combine import combine_allure
# 1) Create complete.html in allure-generated folder
combine_allure("./some/path/to/allure/generated/folder")
# 2) Create complete.html in specified folder
combine_allure("./some/path/to/allure/generated/folder", dest_folder="/tmp")
# 3) Make sure that dest folder exists, create if not
combine_allure(
"./some/path/to/allure/generated/folder",
dest_folder="/tmp/allure-2022-05-05_12-20-01/result",
auto_create_folders=True
)
# 4) Remove sinon.js and server.js from allure folder after complete.html is generated:
combine_allure(
"./some/path/to/allure/generated/folder",
remove_temp_files=True
)
# 5) If html/json files what should be utf-8 is has broken encoding, ignore errors:
combine_allure(
"./some/path/to/allure/generated/folder",
ignore_utf8_errors=True
)
TODO
- Functionality to open image or video in new browser tab doesn't work yet.
- Need functionality to return combined file as a string, not saving it to a file directly
- Functionality to not change source files at all, work in a read-only filesystem
Ports to other languages:
- Javascript port: https://github.com/aruiz-caritsqa/allure-single-html-file-js
Metadata
Release files for allure-combine 1.0.11
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| allure_combine-1.0.11.tar.gz | 667.2 kB | Without provenance | Details |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| allure_combine-1.0.11-py3.9.egg | Legacy Egg format | - | - | Details |
| allure_combine-1.0.11-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 2.0 MB
Release files / allure_combine-1.0.11.tar.gz
| Download URL | allure_combine-1.0.11.tar.gz |
|---|---|
| Size | 667.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7a5134ff5407101373f1e782e1da59ae14091146f7b5862205d57df15f4fb903
|
|
BLAKE2b-256 checksum How to use checksums |
c93806ebd56515397613d930a066a04fee460d4a3d546701b8ea20c2ffaec215
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.10
|
Release files / allure_combine-1.0.11-py3.9.egg
| Download URL | allure_combine-1.0.11-py3.9.egg |
|---|---|
| Size | 673.2 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
4cec7791e6eac36a9da5575cef85d0df9763efaeb15a31e4d8f53c2dd6f9dbe0
|
|
BLAKE2b-256 checksum How to use checksums |
8e4e8e5a0cb1b77e72bbbc6e06a1c0316b115067ae19ff02fde8d065a88602a6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.10
|
Release files / allure_combine-1.0.11-py3-none-any.whl
| Download URL | allure_combine-1.0.11-py3-none-any.whl |
|---|---|
| Size | 669.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cb4038ce405aab86339c4ab05b021e195fe53c06ff22130f54da2e8d3ccc9ddb
|
|
BLAKE2b-256 checksum How to use checksums |
e2de4d8e3b63c1eaa66c0d6d8ca1fa18dd727fe03b1f688464138fbaebdcab40
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.10
|
Security for allure-combine 1.0.11
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.