Table of Contents

Class GherkinDslParser

Namespace
TinyBDD.Extensions.FileBased.Parsers
Assembly
TinyBDD.Extensions.FileBased.dll

Parses Gherkin .feature files containing scenario definitions.

public sealed class GherkinDslParser : IDslParser
Inheritance
GherkinDslParser
Implements
Inherited Members

Remarks

Supports standard Gherkin syntax:

Feature: Feature Name
  Optional feature description

Scenario: Scenario Name
  Given the application is running
  When I register a user with email "test@example.com"
  Then the user should exist

Scenario Outline: Parameterized Scenario
  Given a value of <input>
  When I process it
  Then the result should be <output>

Examples:
  | input | output |
  | 5     | 10     |
  | 3     | 6      |

Methods

ParseAsync(string, CancellationToken)

Parses a file and returns feature definitions.

public Task<FeatureDefinition> ParseAsync(string filePath, CancellationToken cancellationToken = default)

Parameters

filePath string

Path to the file to parse.

cancellationToken CancellationToken

Cancellation token.

Returns

Task<FeatureDefinition>

Parsed feature definition.