Turns folder of gherkin feature files into a docx file.
Project description
Feature reporter
"Feature reporter" comes from the need to provide MS Word reports to customer.
It aims to pretty print a set of plain text .feature
files into one shareable document.
Optionally, it adds the last automated execution of these scenarios.
Please note! This package heavily relies on the Behave package in order to process feature file and execution results format.
Installation
pip install eaiscenarioreporter
Usage
From a python shell
from featurereporter import ExportUtilities
my_export = ExportUtilities()
my_export.feature_repository = "path/to/the/feature/files/folder"
my_export.create_application_documentation()
# Create the demo.docx document in the current folder.
From the command line
GUI (experimental)
You can start the reporter's GUI using the following command :
python3 -m featurereporter
CLI
Feature reporter can be called directly from the command line.
# Display help
> python3 -m featurereporter -h
usage: featurereporter.py [-h] [--tag TAG] [--title TITLE] [--repository REPOSITORY] [--forewords FOREWORDS] [--output OUTPUT] [--execution EXECUTION] [--license]
optional arguments:
-h, --help show this help message and exit
--tag TAG Invariant pointing to a user story
--title TITLE The document's title
--repository REPOSITORY
The folder where the feature files are
--forewords FOREWORDS
The folder where forewords markdown files are. It is not a recursive discovery.
--output OUTPUT The filename the docu
--execution EXECUTION
Behave plain test output in order to also print the last execution result
--license Display the license.
python3 -m featurereporter --repository path/to/the/feature/files/folder
Embedded features
Feature description
All descriptions can use markdown syntax to enhance the report display in docx.
- The matching
[Bb]usiness [Rr]ules
will be replaced by a title with the correct depthBusiness rules
- The matching sequence
!!Worflow:\s*([\.\d\w\-\_\\\/]*)\s*
points out a puml diagram which will be generated on the fly. The puml file path is relative to the feature folder holder. For example!!Workflow: ../business/workflow.puml
will generate theworkflow.puml
diagram in thebusiness
folder of the feature parent folder.
Forewords inclusion
You can include markdown files as a "Forewords" section. They will be processed in alphabetical order.
- Picture inclusion will be resized to fit the document page.
!!Worflow:\s*([\.\d\w\-\_\\\/]*)\s*
does the same as for feature description. However, the base folder is the forewords' folder.
Result inclusion
You can include the full list of the documentation execution results. It's based on Behave's plain output reporter.
It generates a circular graph (passed, failed, skipped) and list each scenario result.
There is no control on the sections order nor ability to display only failed scenarios.
Additional installation
Currently, all puml schema are processed using the GraphViz library. Your system needs java and GraphViz.
The plantuml's jar version is 1.2022.1. Please see PlantUml page.
Disclaimer
This tool is still under development. There is currently no arguments control nor formal tests.
I use it in my daily work to produce report.
Please contact me for any concern.
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
Hashes for eaiscenarioreporter-0.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 36837d08f13d25680893ef0b5ffceed6fe2dd5a4d06b45f4a0a67a8d59183ee6 |
|
MD5 | 4289a23ec4b0ec51eb5a45fc904f229e |
|
BLAKE2b-256 | 19e4052d4be4d67fa8d9af1396ab3d4b33d42d490bbfdff0314c2ac39cee1cd3 |
Hashes for eaiscenarioreporter-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0be6d306f56d016a4abdc7f04aad96d40c9a30d56398aa4fcc845a495f7e8bd9 |
|
MD5 | aeda9baad3f0ac5a686d7a13ce540323 |
|
BLAKE2b-256 | e53dbd92459efa862ac0638586c6bc154bf43d62805786385b3e25fa09300f26 |