Parsing Gherkin Descriptions

Learn how to parse gherkin descriptions using the Gherkin class.

We'll cover the following...

Gherkin supports the concept of free-form descriptions, which can be added to features, scenarios, backgrounds, scenario outlines, and rules. These descriptions are indented below the Gherkin construct they belong to, just like anything else, and can contain any content as long as the lines do not start with any Gherkin keyword. The code snippet below provides an example of a Gherkin description:

Press + to interact
Feature: Guess the word
The word guess game is a turn-based game for two players.
The Maker makes a word for the Breaker to guess. The game
is over when the Breaker guesses the Maker's word.

The basic process for parsing ...