Skip to content
@gherking

GherKing

GherKing is a tool to make Gherkin smarter! It allows you to handle Cucumber/Gherkin feature files programatically, in your JavaScript/TypeScript code.

Hi there 👋

GherKing is a tool to make Gherkin smarter! It allows you to programmatically handle Cucumber/Gherkin feature files in your JavaScript/TypeScript code.

What can you do with GherKing?

  • You can use the gherkin-ast package to build and work with feature files in your code using an AST.
  • You can load and parse feature files to AST and save them back using the gherkin-io package and the gherkin-formatter to make them pretty.
  • You can use the gherking CLI tool (and the precompilers below) to build a precompiler for your feature files, adding more logic and magic 🌈 to your feature files.

Our precompilers

  • Filter - gpc-filter - to include or exclude scenario/outlines of feature files based on a cucumber-tag-expression.
  • For Loop - gpc-for-loop - to loop scenarios and scenario outlines to repeat them.
  • License - gpc-license - to add a license statement to the feature files.
  • Macro - gpc-macro - to create and execute macros.
  • Remove Comments - gpc-remove-comments - to remove all or particular types of semantic comments from the feature file.
  • Remove Duplicates - gpc-remove-duplicates - to remove duplicated tags or example data table rows.
  • Replacer - gpc-replacer - to replace keywords in the feature files.
  • Scenario Numbering - gpc-scenario-numbering - to add an index to all scenarios and scenario outline's name.
  • Scenario Outline Expander - gpc-scenario-outline-expander - to expand the Scenario Outlines to actual scenarios.
  • Scenario Outline Numbering - gpc-scenario-outline-numbering - to make all scenarios generated from scenario outlines unique.
  • Step Group - gpc-step-groups - to correct the gherkin keywords of steps to make the tests more readable.
  • Test Data - gpc-test-data - to load external data (JSON, CSV, or XLS/XLSX) into the examples table.

Precompilers we plan

  • Copy - to copy feature files and distribute them based on some logic (e.g., to different folders, based on a tag) (gherking#39)
  • Example Sampler - to chose a given number of random example (gherking#37)
  • Sorter - to sort scenario/outline based on certain conditions (gherking#52)
  • Splitter - to split each scenario/outline to separate feature files to improve parallelization (gherking#44)
  • Suite Generator - to sort feature files and scenarios/outlines in separate files based on suite tags (gherking#45)

Do you have an idea for a cool precompiler? Send your idea to us!

Precompilers made by the community

Do you have a precompiler you implemented? Send it to us! And we will list here!

Upcoming features

  • gherking/jumpstart command (in progress) - to kick-off usage of GherKing easier (gherking#66)
  • gpc-replacer/built-in tokens - to add the possibility to use UUID much more easily (gpc-replacer#4)
  • gherking/Controlling precompiler application - to control which precompiler is applied to a given feature file or which is not (gherking#73)

Do you have an idea for any new features? Send your idea to us!

Pinned

  1. gherking gherking Public

    GherKing is a tool to make Gherkin smarter! It allows you to handle Cucumber/Gherkin feature files programmatically, in your JavaScript/TypeScript code.

    TypeScript 13 2

  2. gherkin-ast gherkin-ast Public

    JS model for Gherkin feature files to build and work with feature files in your code, using an AST.

    TypeScript 9 3

  3. gherkin-io gherkin-io Public

    Tool to read/write Gherkin feature files and to work with Gherkin-AST

    TypeScript 3 1

  4. gpc-for-loop gpc-for-loop Public

    A precompiler of GherKing to loop scenarios and scenario outlines to repeat them.

    TypeScript 1

  5. gpc-test-data gpc-test-data Public

    This precompiler can load external data (JSON, CSV, or XLS/XLSX) into exmaples table.

    TypeScript 1

  6. gpc-replacer gpc-replacer Public

    The Replacer precompiler is responsible for exchanging predefined strings in the feature files. It inserts the provided text in the place held for them.

    Gherkin

Repositories

Showing 10 of 22 repositories
  • gpc-test-data Public

    This precompiler can load external data (JSON, CSV, or XLS/XLSX) into exmaples table.

    TypeScript 0 MIT 1 0 0 Updated Apr 11, 2024
  • schemastore Public Forked from SchemaStore/schemastore

    A collection of JSON schema files including full API

    JavaScript 0 Apache-2.0 1,601 0 0 Updated Feb 3, 2024
  • gherkin-ast Public

    JS model for Gherkin feature files to build and work with feature files in your code, using an AST.

    TypeScript 9 MIT 3 0 0 Updated Jan 22, 2024
  • gherkin-formatter Public

    Tool to format gherkin-ast model to gherkin string

    TypeScript 11 MIT 3 0 0 Updated Jan 22, 2024
  • gherking Public

    GherKing is a tool to make Gherkin smarter! It allows you to handle Cucumber/Gherkin feature files programmatically, in your JavaScript/TypeScript code.

    TypeScript 13 MIT 2 15 0 Updated Jan 12, 2024
  • gherking.github.io Public

    GherKing is a tool to make Gherkin smarter! It allows you to handle Cucumber/Gherkin feature files programmatically, in your JavaScript/TypeScript code.

    0 0 0 0 Updated Jan 9, 2024
  • .github Public
    0 1 0 0 Updated Jan 9, 2024
  • gherkin-io Public

    Tool to read/write Gherkin feature files and to work with Gherkin-AST

    TypeScript 3 MIT 1 0 0 Updated Nov 12, 2023
  • gpc-template Public template

    Template for a GherKing precompiler

    TypeScript 0 MIT 0 0 0 Updated Oct 19, 2023
  • gpc-remove-duplicates Public

    The RemoveDuplicates precompiler is responsible for having only a reasonable amount of tags and/or rows in each feature file.

    Gherkin 0 MIT 0 0 0 Updated Oct 18, 2023

People

This organization has no public members. You must be a member to see who’s a part of this organization.

Top languages

Loading…

Most used topics

Loading…