[][src]Crate gherkin_rust

A Gherkin parser for the Cucumber test framework.

It is intended to parse the full gamut of Cucumber .feature files that exist in the wild, as there is only a de facto standard for these files.

.feature file structure

The basic structure of a feature file is:

  • Optionally one or more tags
  • Optionally #-prefixed comments on their own line
  • The feature definition
  • An optional description
  • An optional background
  • One or more scenarios (also taggable), each including:
    • One or more steps
    • Optionally data tables or docstrings per step
    • Optionally examples, which can also be tagged
  • One or more rules (also taggable), each including:
    • An optional background
    • One or more scenarios

Unparsed elements

Indentation and comments are ignored by the parser. Most other things can be accessed via properties of the relevant struct.

Re-exports

pub extern crate pest;

Structs

Background

A feature background

BackgroundBuilder

Builder for Background.

Examples

Examples for a scenario

ExamplesBuilder

Builder for Examples.

Feature

A feature

FeatureBuilder

Builder for Feature.

Rule

A rule, as introduced in Gherkin 6.

RuleBuilder

Builder for Rule.

Scenario

A scenario

ScenarioBuilder

Builder for Scenario.

Step

A scenario step

StepBuilder

Builder for Step.

Table

A data table

TableBuilder

Builder for Table.

Enums

StepType

The fundamental Gherkin step type after contextually handling But and And

TryFromError

Type Definitions

Error

Re-exported pest::Error wrapped around the Rule type