Class YamlDslParser
- Namespace
- TinyBDD.Extensions.FileBased.Parsers
- Assembly
- TinyBDD.Extensions.FileBased.dll
Parses YAML files containing scenario definitions.
public sealed class YamlDslParser : IDslParser
- Inheritance
-
YamlDslParser
- Implements
- Inherited Members
Remarks
Expected YAML format:
feature: Feature Name
description: Optional description
tags:
- tag1
- tag2
scenarios:
- name: Scenario Name
description: Optional description
tags:
- scenario-tag
steps:
- keyword: Given
text: the application is running
- keyword: When
text: I register a user with email {email}
parameters:
email: test@example.com
- keyword: Then
text: the user should exist
Constructors
YamlDslParser()
public YamlDslParser()
Methods
ParseAsync(string, CancellationToken)
Parses a file and returns feature definitions.
public Task<FeatureDefinition> ParseAsync(string filePath, CancellationToken cancellationToken = default)
Parameters
filePathstringPath to the file to parse.
cancellationTokenCancellationTokenCancellation token.
Returns
- Task<FeatureDefinition>
Parsed feature definition.