eaiscenarioreporter


Nameeaiscenarioreporter JSON
Version 0.4.10 PyPI version JSON
download
home_pagehttps://github.com/Hidden-goblin/eaiscenarioreporter.git
SummaryTurns folder of gherkin feature files into a docx file.
upload_time2023-06-21 20:08:15
maintainer
docs_urlNone
authorEric Aïvayan
requires_python>=3.7, !=2.*
license
keywords bdd gherkin behave docx
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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](https://behave.readthedocs.io/en/stable/) in 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.

## Installation 

```
pip install eaiscenarioreporter
```

## Usage

### From a python shell

```python
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 :

```commandline
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.


```
 
```commandline
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 depth `Business 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 the `workflow.puml` diagram in the `business` 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](https://www.java.com/en/download/) and [GraphViz](https://graphviz.org/download/).

The plantuml's jar version is 1.2022.1. Please see [PlantUml page](https://plantuml.com/en/).


## Behave csv formatter

To use the default setting just use the following (`-d` is for dry-run)

```commandline
behave -d -f featurereporter.csvformatter:EaiCsv -o output.csv
```

Add in `behave.ini` the following to update the tag setting. You can have a `=` symbol in your tag definition.

```ini
[behave.userdata]
EaiCsv.epic = my_epic_tag
EaiCsv.scenario = my_scenario_id_tag
```


The csv output is 

```csv
epic, 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' formatter

To use the default setting just use the following (`-d` is for dry-run).

**Please mind** this formatter is for dry-run only.

```commandline
behave -d -f featurereporter.csvformatter:EaiCsvFull -o output.csv
```

Add in `behave.ini` the following to update the tag setting. You can have a `=` symbol in your tag definition.

```ini
[behave.userdata]
EaiCsv.epic = my_epic_tag
EaiCsv.scenario = my_scenario_id_tag
```


The csv output is 

```csv
epic, 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.

## 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.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Hidden-goblin/eaiscenarioreporter.git",
    "name": "eaiscenarioreporter",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7, !=2.*",
    "maintainer_email": "",
    "keywords": "BDD,Gherkin,behave,docx",
    "author": "Eric A\u00efvayan",
    "author_email": "eric.aivayan@free.fr",
    "download_url": "https://files.pythonhosted.org/packages/00/24/1dee8cba23ec1b56c3581f55bb76ee8d2276d1be2fd8e79201b933392d7f/eaiscenarioreporter-0.4.10.tar.gz",
    "platform": null,
    "description": "# Feature reporter\n\n\"Feature reporter\" comes from the need to provide MS Word reports to customer.\n\nIt aims to pretty print a set of plain text `.feature` files into one shareable document.\n\nOptionally, it adds the last automated execution of these scenarios.\n\n**Please note!** This package heavily relies on the [Behave package](https://behave.readthedocs.io/en/stable/) in order \nto process feature file and execution results format.\n\nMoreover, it provides a basic behave csv formatter. You can:\n\n- have a csv result for each scenario.\n- have a csv list of each scenario using the behave's dry run option.\n\nIn my feature file I usually add a tag for the epic's name (`@epic=`) and a scenario id (`@id=`).\n\nThe csv formatter use these tag by default. Please see below for more details on usage.\n\n## Installation \n\n```\npip install eaiscenarioreporter\n```\n\n## Usage\n\n### From a python shell\n\n```python\nfrom featurereporter import ExportUtilities\n\nmy_export = ExportUtilities()\n\nmy_export.feature_repository = \"path/to/the/feature/files/folder\"\n\nmy_export.create_application_documentation()\n\n# Create the demo.docx document in the current folder.\n```\n\n### From the command line\n\n#### GUI (experimental)\n\nYou can start the reporter's GUI using the following command :\n\n```commandline\npython3 -m featurereporter\n```\n\n#### CLI \n\nFeature reporter can be called directly from the command line.\n\n```\n# Display help\n> python3 -m featurereporter -h\n\nusage: featurereporter.py [-h] [--tag TAG] [--title TITLE] [--repository REPOSITORY] [--forewords FOREWORDS] [--output OUTPUT] [--execution EXECUTION] [--license]\n\noptional arguments:\n  -h, --help            show this help message and exit\n  --tag TAG             Invariant pointing to a user story\n  --title TITLE         The document's title\n  --repository REPOSITORY\n                        The folder where the feature files are\n  --forewords FOREWORDS\n                        The folder where forewords markdown files are. It is not a recursive discovery.\n  --output OUTPUT       The filename the docu\n  --execution EXECUTION\n                        Behave plain test output in order to also print the last execution result\n  --license             Display the license.\n\n\n```\n \n```commandline\npython3 -m featurereporter --repository path/to/the/feature/files/folder\n```\n\n### Embedded features\n\n#### Feature description\n\nAll descriptions can use Markdown syntax to enhance the report display in docx.\n\n- The matching `[Bb]usiness [Rr]ules` will be replaced by a title with the correct depth `Business rules`\n- The matching sequence `!!Worflow:\\s*([\\.\\d\\w\\-\\_\\\\\\/]*)\\s*` points out a puml diagram which will be generated on the fly. \nThe puml file path is relative to the feature folder holder. For example `!!Workflow: ../business/workflow.puml` will generate the `workflow.puml` diagram in the `business` folder of the feature parent folder. \n\n\n#### Forewords inclusion\n\nYou can include markdown files as a \"Forewords\" section. They will be processed in alphabetical order.\n\n- Picture inclusion will be resized to fit the document page.\n- `!!Worflow:\\s*([\\.\\d\\w\\-\\_\\\\\\/]*)\\s*` does the same as for feature description. However, the base folder is the forewords' folder.\n\n#### Result inclusion\n\nYou can include the full list of the documentation execution results. It's based on Behave's plain output reporter.\n\nIt generates a circular graph (*passed*, *failed*, *skipped*) and list each scenario result.\n\nThere is no control on the sections order nor ability to display only *failed* scenarios.\n\n## Additional installation\n\nCurrently, all puml schema are processed using the GraphViz library. Your system needs [java](https://www.java.com/en/download/) and [GraphViz](https://graphviz.org/download/).\n\nThe plantuml's jar version is 1.2022.1. Please see [PlantUml page](https://plantuml.com/en/).\n\n\n## Behave csv formatter\n\nTo use the default setting just use the following (`-d` is for dry-run)\n\n```commandline\nbehave -d -f featurereporter.csvformatter:EaiCsv -o output.csv\n```\n\nAdd in `behave.ini` the following to update the tag setting. You can have a `=` symbol in your tag definition.\n\n```ini\n[behave.userdata]\nEaiCsv.epic = my_epic_tag\nEaiCsv.scenario = my_scenario_id_tag\n```\n\n\nThe csv output is \n\n```csv\nepic, feature_name, scenario_id, scenario_name, status, order\n\"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\"\n```\n\nThe first line contains the csv header.\n\n\n## Behave csv 'full' formatter\n\nTo use the default setting just use the following (`-d` is for dry-run).\n\n**Please mind** this formatter is for dry-run only.\n\n```commandline\nbehave -d -f featurereporter.csvformatter:EaiCsvFull -o output.csv\n```\n\nAdd in `behave.ini` the following to update the tag setting. You can have a `=` symbol in your tag definition.\n\n```ini\n[behave.userdata]\nEaiCsv.epic = my_epic_tag\nEaiCsv.scenario = my_scenario_id_tag\n```\n\n\nThe csv output is \n\n```csv\nepic, feature_filename, feature_name, feature_tags, feature_description, scenario_id, scenario_name, scenario_tags, scenario_description, scenario_is_outline, scenario_steps\n\"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\"\n```\n\nThe first line contains the csv header.\n\n## Disclaimer\n\nThis tool is still under development. There is currently **no** arguments control nor formal tests.\n\nI use it in my daily work to produce report.\n\nPlease contact me for any concern.\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Turns folder of gherkin feature files into a docx file.",
    "version": "0.4.10",
    "project_urls": {
        "Homepage": "https://github.com/Hidden-goblin/eaiscenarioreporter.git"
    },
    "split_keywords": [
        "bdd",
        "gherkin",
        "behave",
        "docx"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6f0d44d771f5f78fea1c817168aee3c63e1e38c403c988e6467d1b71c3670017",
                "md5": "bdc13746bff7fe8c0c90b1e61df16890",
                "sha256": "a4f3946e893c9f9733edbd46cf55c752b8bb6793bfeb7509c3054a608ad8b7bf"
            },
            "downloads": -1,
            "filename": "eaiscenarioreporter-0.4.10-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "bdc13746bff7fe8c0c90b1e61df16890",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7, !=2.*",
            "size": 9293762,
            "upload_time": "2023-06-21T20:05:28",
            "upload_time_iso_8601": "2023-06-21T20:05:28.706920Z",
            "url": "https://files.pythonhosted.org/packages/6f/0d/44d771f5f78fea1c817168aee3c63e1e38c403c988e6467d1b71c3670017/eaiscenarioreporter-0.4.10-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "00241dee8cba23ec1b56c3581f55bb76ee8d2276d1be2fd8e79201b933392d7f",
                "md5": "850dc337d4a48c8cfb51ef54307d502a",
                "sha256": "d21c013400aedd8b400849a86e1c97fdb6ea66c804ccd8bcf8764afd426b86da"
            },
            "downloads": -1,
            "filename": "eaiscenarioreporter-0.4.10.tar.gz",
            "has_sig": false,
            "md5_digest": "850dc337d4a48c8cfb51ef54307d502a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7, !=2.*",
            "size": 9283840,
            "upload_time": "2023-06-21T20:08:15",
            "upload_time_iso_8601": "2023-06-21T20:08:15.013430Z",
            "url": "https://files.pythonhosted.org/packages/00/24/1dee8cba23ec1b56c3581f55bb76ee8d2276d1be2fd8e79201b933392d7f/eaiscenarioreporter-0.4.10.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-21 20:08:15",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Hidden-goblin",
    "github_project": "eaiscenarioreporter",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "eaiscenarioreporter"
}
        
Elapsed time: 0.08097s