DOCX and PDF report generation based on allure-generated result files.
- This was only tested so far using results from
allure-pytest. Therefore it expects a folder with
.jsonfiles generated by the allure plugins.
Check the issues on the repository to see other current limitations.
Feel free to open an issue ticket with any problems or questions. Please if possible provide your test result files so we can debug it more efficiently.
We publish windows standalone executable files. With them you can use it without having to install anything else other than the cairo dlls, meaning no installing python, etc.
You can download them at: https://github.com/typhoon-hil/allure-docx/releases
Then you can use the executable directly (possibly adding it a folder added to PATH).
You can install from source using:
pip install git+https://github.com/typhoon-hil/allure-docx.git
Then you should be able to use
allure-docx executable like you use
Check usage by running
You can generate the docx file by running
allure-docx ALLUREDIR filename.docx
--detail-level option to control level of detail in the docx report (e.g. print all steps or not). Check the help for available levels.
The generated docx contain a Table of Contents that needs to be manually updated after generation. Generating PDFs (see below) will automatically update the TOC though.
LibreOfficeToPDF application in the PATH to generate the PDF.
On Windows, PDFs can be generated from generated docx files using OfficeToPDF application. MS Word needs to be installed.
On Windows and Linux, PDFs can be generated using
LibreOfficeToPDF application. LibreOffice should be installed.
LibreOfficeToPDF are present,
OfficeToPDF will be used.
Custom Title and Logo
You can use the
--title option to customize the docx report title.
If you want to remove the title altogether (e.g. your logo already has the company title), you can set
You can also use the
--logo option with a path to a custom image to add the test title and the
--logo-height option to adjust the height size of the logo image (in centimeters).
allure-docx --pdf --title="My Company" --logo=C:\mycompanylogo.png --logo-height=2 allure allure.docx
Building the standalone executable
We use PyInstaller to create standalone executables. If you want to build an executable yourself, follow these steps:
- Create a new virtual environment with the proper python version (tested using python 3, 32 or 64 bit so far)
- Install using pip
pyinstallerand ONLY needed packages defined in
setup.py. This prevents your executable to become too large with unnecessary dependencies
- Delete any previous
distfolder from a previous PyInstaller run
- Run the
build_exe.cmdcommand to run PyInstaller and create a single file executable.
If having the following error:
ImportError: This package should not be accessible on Python 3. Either you are trying to run from the python-future src folder or your installation of python-future is corrupted.
pip install --force-reinstall -U future (https://github.com/nipy/nipype/issues/2646)