gherkin-detailer

gherkin-detailer is a tool that checks the gherkin files included in your project and list them, highlighting some of their details.

View the Project on GitHub silversonicaxel/gherkin-detailer

Coverage Status

gherkin-detailer

gherkin-detailer is a powerful tool designed to analyze and optimize your gherkin files within a project. It helps you maintain a clean and efficient codebase by providing an overview of your gherkin files and highlighting potential duplications.

Documentation

Introduction

gherkin-detailer is a tool that generates comprehensive HTML reports for the gherkin files in your project. These reports help you manage and optimize your gherkin scenarios, ensuring a cleaner and more efficient codebase. The tool currently provides six detailed sections:

Each detail in these sections is color-coded to highlight potential similarities, helping you identify and address code duplication within your project.

Examples

Example: Files Section

example 1

The Files section lists all the gherkin scenarios across all *.feature files in your project. This page serves as a comprehensive documentation of your project, organized by file and detailing all specific use cases.

Color Coding

The color coding provides additional insights into the gherkin elements:

Example: Actions Section

example 2

The Actions section lists all the actions (When steps) present in your gherkin files. This page helps developers quickly locate and review all the actions defined across the project.

The navigation menu allows developers to efficiently move between different sections of the report:

This menu enables you to switch between sections to gain detailed insights into specific elements of your gherkin files, allowing for thorough analysis and easy navigation throughout the project.

Requirements

Installation

gherkin-detailer can be installed as a global tool:

$ npm install -g gherkin-detailer

$ yarn global add gherkin-detailer

or as a devDependency:

$ npm install -D gherkin-detailer

$ yarn add --dev gherkin-detailer

Usage

If you’ve installed it as a devDependency, you need to add it in the script section of the package.json.

To execute it with all default options, so to let its analysis starts from the current folder, set this up:

"gherkin-detailer": "gherkin-detailer"

To customize the analysis folder, set this up:

"gherkin-detailer": "gherkin-detailer -a './src/'"

To customize the output folder, set this up:

"gherkin-detailer": "gherkin-detailer -o './report/'"

To customize the report theme, set this up:

"gherkin-detailer": "gherkin-detailer -t 'black'"

Then the gherkin-detailer can be executed in order to have a gherkins report created in a default folder ./report/gherkin-detailer/

$ npm run gherkin-detailer

$ yarn gherkin-detailer

Help


$ gherkin-detailer --help

Usage: gherkin-detailer [options] <option>

  Options:

    -v, --version                           Output the version number
    -a, --analysis [analysis]               Select folder to analyse
    -o, --output [output]                   Select folder to output
    -t, --theme [theme]                     Select report theme (white|black)
    -h, --help                              Output usage information