npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

gherkin-detailer

v2.2.0

Published

gherkin-detailer is a tool that check the gherkins included in you project and lists them, highlights their similarities.

Downloads

39

Readme

Build Status Coverage Status

gherkin-detailer

gherkin-detailer is a tool that checks the gherkin files included in you project and:

  • list them per type - to create a general total overview
  • highlight similarities - to prevent duplication of code for similar situations

Documentation

Introduction

gherkin-detailer is a tool that generates HTML reports related to the gherkins that are part of the project you are working on. Currently there are six sections available:

  • Files list (containing the entire list of all the detailed scenarios)
  • Features list (containing the simple list of all the features)
  • Scenarios list (containing the simple list of all the scenarios and scenarios outlines)
  • States list (containing the simple list of all the given - states)
  • Actions list (containing the simple list of all the when - actions)
  • Outcomes list (containing the simple list of all the then - outcomes)

Every detail of every section has a background color that highlight potential similarities across the gherkins that might hide duplication of code within the project.

Examples

example 1 This first example shows the Files section, and it lists the entire gherkins in all *.feature files. This page is the perfect documentation for the project, separated per file and describing all specific use cases.

The colour shows extra information.

  • The red ones show the equal elements of every gherkins, so the developer should immediately understand that those sentences (actions, outcomes, scenarios, etc...) represent always the same entity and that there should be just one specific code associated to them all.
  • The orange one show the similar elements of every gherkins, so the developer should eventually check if those similarity are correct and really represent different entity with different associated code, or maybe they might hide some errors and duplication of code.

example 2 The second example shows the Actions section, and it lists all the actions

The menu help the developer to navigate to Files to have a general overview of all the gherkins of the project, or could chose specific elements of every gherkins, from Features to Scenarios, from States to Actions and Outcomes.

Requirements

  • node 10.12+
  • npm 6.0+

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