Package: allure-docx
allure-docxDOCX and PDF report generation based on allure-generated result files.AboutThis package is developed in collaboration byTyphoon Hiland theFraunhofer Institute for Solar Energy Systems ISE. Users are welcome to test and report problems and suggestions by creating an issue. Note that the package is not officially supported by Typhoon HIL and is still on the alpha phase.LimitationsThe generator was only tested so far using allure results from python withallure-pytestand java withallure-junit5. Therefore it expects a folder with.jsonfiles generated by the allure plugins.Check the issues on the repository to see other current limitations.QuestionsFeel 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.InstallationThe library uses matplotlib which depends on Visual C++ Redistributables. If not already installed, you can get them here:https://www.microsoft.com/en-in/download/details.aspx?id=48145.WindowsWe publish windows standalone executable files. With them you can use it without having to install anything else, meaning no installing python, etc.You can download them at:https://github.com/typhoon-hil/allure-docx/releasesThen you can use the executable directly (possibly adding it a folder added to PATH).Linux and WindowsYou can install from source using:pip install git+https://github.com/typhoon-hil/allure-docx.gitThen you should be able to useallure-docxexecutable like you usepip.UsageCheck usage by runningallure-docx --helpYou can generate the docx file by runningallure-docx ALLUREDIR filename.docxConfigurationUse the--config_tag/--config_fileoption to control which information should be added. Use the preset names or give a path to your custom .ini file.
When using a custom configuration the standard configuration is used as base and is overwritten for each attribute inside the custom file.
The standard file looks like this:[info]
description = fbpsu
details = fbpsu
trace = fbpsu
parameters = fbpsu
links = fbpsu
setup = fbpsu
body = fbpsu
teardown = fbpsu
duration = fbpsu
attachments = fbpsu
[labels]
severity = fbpsu
[cover]
title = Allure
[details]The report will display tests with the specified field (info and labels section) if the corresponding character is included. For mapping see following table:failedbrokenpassedskippedunknownfbpsuThere are some additional information you can add to your report. This includes following:Add custom labelsThe allure engine allows for custom labels inside the test code. These are not printed on standard.
You can add a custom label under[labels]section to include it in the report. It will appear inside the label table directly below the test heading.Example:[labels]
some_label = fbpsuAdd a company name to the coverYou can include a company name on the cover of the report by setting thecompany_namevariable under the[cover]section.Example:[cover]
company = Some companyAdd custom details to the Test Details sectionYou can add custom variables inside the[details]section. These will be printed on the Test Details section of the document.Example:[details]
Test name = Example Test
Device under test = Example device under test
Relevant documents = 
    Document abc v1.5
    Document xyz v5.4
Description = This is a test description.This will be printed as following table under Test Details:Test nameExample TestDevice under testExample device under testRelevant documentsDocument abc v1.5Document xyz v5.4DescriptionThis is a test description.Putting "Device under test" into the details section also adds the value to the header."Custom Title and LogoYou can use the--titleoption to customize the docx report title (or specify inside custom configuration file, as described above).If you want to remove the title altogether (e.g. your logo already has the company title), you can set--title="".You can also use the--logooption with a path to a custom image to add the test title and the--logo-widthoption to adjust the width size of the logo image (in centimeters).Example invocation:allure-docx --pdf --config_file=C:\myconfig.ini --logo=C:\mycompanylogo.png --logo-width=2 allure allure.docxPDFThe--pdfoption will search for either Word (Windows only) orsoffice(LibreOffice) to generate the PDF.If both Word andsofficeare present, Word will be used.Previous versionsThe previous version of the package can be found in the releases page of the pluginhere.MiscelaneousBuilding the standalone executableWe 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 pippyinstallerand ONLY needed packages defined insetup.py. This prevents your executable to become too large with unnecessary dependenciesDelete any previousdistfolder from a previous PyInstaller runRun thebuild_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.Runpip install --force-reinstall -U future(https://github.com/nipy/nipype/issues/2646)