Package: eaiscenarioreporter
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.featurefiles into one shareable document.Optionally, it adds the last automated execution of these scenarios.Please note!This package heavily relies on theBehave packagein order
to process feature file and execution results format.Moreover, it provides a basic behave csv formatter. You can:have a csv result for each scenario.have a csv list of each scenario using the behave's dry run option.In my feature file I usually add a tag for the epic's name (@epic=) and a scenario id (@id=).The csv formatter use these tag by default. Please see below for more details on usage.Installationpip install eaiscenarioreporterUsageFrom a python shellfromfeaturereporterimportExportUtilitiesmy_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 lineGUI (experimental)You can start the reporter's GUI using the following command :python3 -m featurereporterCLIFeature 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/folderEmbedded featuresFeature descriptionAll descriptions can use Markdown syntax to enhance the report display in docx.The matching[Bb]usiness [Rr]uleswill be replaced by a title with the correct depthBusiness rulesThe 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.pumlwill generate theworkflow.pumldiagram in thebusinessfolder of the feature parent folder.Forewords inclusionYou 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 inclusionYou 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 onlyfailedscenarios.Additional installationCurrently, all puml schema are processed using the GraphViz library. Your system needsjavaandGraphViz.The plantuml's jar version is 1.2022.1. Please seePlantUml page.Behave csv formatterTo use the default setting just use the following (-dis for dry-run)behave -d -f featurereporter.csvformatter:EaiCsv -o output.csvAdd inbehave.inithe following to update the tag setting. You can have a=symbol in your tag definition.[behave.userdata]EaiCsv.epic=my_epic_tagEaiCsv.scenario=my_scenario_id_tagThe csv output isepic, feature_name, scenario_id, scenario_name, status, order
"epic name fetched from the epic's tag", "feature name", "scenario id fetched from the id's tag and order for outline scenario", "scenario name", "execution status", "order for outline scenario"The first line contains the csv header.Behave csv 'full' formatterTo use the default setting just use the following (-dis for dry-run).Please mindthis formatter is for dry-run only.behave -d -f featurereporter.csvformatter:EaiCsvFull -o output.csvAdd inbehave.inithe following to update the tag setting. You can have a=symbol in your tag definition.[behave.userdata]EaiCsv.epic=my_epic_tagEaiCsv.scenario=my_scenario_id_tagThe csv output isepic, feature_filename, feature_name, feature_tags, feature_description, scenario_id, scenario_name, scenario_tags, scenario_description, scenario_is_outline, scenario_steps
"epic name", "feature filename", "feature name (following the 'Feature:' element)", "feature tags", "feature description", "scenario id fetched from the id's tag", "scenario name", "scenario tags", "scenario description", "True if the scenario is an outline one", "scenario's steps without background"The first line contains the csv header.DisclaimerThis tool is still under development. There is currentlynoarguments control nor formal tests.I use it in my daily work to produce report.Please contact me for any concern.