Gherkin.Generator.Utils
0.1.9
dotnet add package Gherkin.Generator.Utils --version 0.1.9
NuGet\Install-Package Gherkin.Generator.Utils -Version 0.1.9
<PackageReference Include="Gherkin.Generator.Utils" Version="0.1.9" />
<PackageVersion Include="Gherkin.Generator.Utils" Version="0.1.9" />
<PackageReference Include="Gherkin.Generator.Utils" />
paket add Gherkin.Generator.Utils --version 0.1.9
#r "nuget: Gherkin.Generator.Utils, 0.1.9"
#:package Gherkin.Generator.Utils@0.1.9
#addin nuget:?package=Gherkin.Generator.Utils&version=0.1.9
#tool nuget:?package=Gherkin.Generator.Utils&version=0.1.9
Gherkin.Generator
A source generator that converts Gherkin .feature files into executable C# test methods, enabling behavior-driven development with automatic test code generation.
Features
- Automatic code generation - Converts
.featurefiles to C# test methods at build time - Scenario support - Handles standard scenarios and scenario outlines with example tables
- Flexible templating - Uses Mustache templates for customizable code generation
- Step matching - Discovers and maps Gherkin steps to your step implementation methods
Why Gherkin.Generator?
Advantages Over Reqnroll/SpecFlow
- ⚡ Zero runtime overhead - All code generation happens at compile-time; no reflection or runtime discovery
- 🔍 Transparent generation - See exactly what code is generated for debugging and understanding
- ✅ Build-time validation - Missing or mismatched steps are caught during compilation, not at test execution
- 🎨 Full template control - Customize generated code via Mustache templates to match any infrastructure
- 📦 Framework agnostic - Generate for NUnit, xUnit, MSTest, or any custom test framework
- 🚀 Faster test execution - Direct method calls without runtime binding overhead
- 📋 Automatic stub generation - Generates stub methods for unimplemented steps with documentation
- 🛠️ Simpler setup - Just add package, configure
[GeneratedTestBase]attribute, and include files in.csproj
Key Trade-offs
- Maturity: Reqnroll is more mature with richer IDE tooling (Visual Studio/Rider extensions)
- Extensibility: Reqnroll offers more runtime flexibility with plugins, hooks, and dependency injection
- Development workflow: Reqnroll's runtime binding enables hot reload—modify step implementations and immediately re-run tests without rebuilding.
Gherkin.Generator optimizes for performance, transparency, and control at the cost of runtime flexibility. Choose Reqnroll if you need advanced runtime features and mature IDE integration. Choose Gherkin.Generator if you want compile-time validation, minimal overhead, and full control over generated code.
Documentation
- User Guide - Complete guide for using Gherkin.Generator
- Developer Guide - For contributors working on this project
Status
In active development. Core features complete. Preparing to test released version internally.
Acknowledgments
This project was developed with assistance from Roo Code, an AI coding assistant.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Gherkin.Generator.Utils:
| Package | Downloads |
|---|---|
|
Gherkin.Generator
Source generator that creates C# test methods from Gherkin feature files for behavior-driven development testing. |
GitHub repositories
This package is not used by any popular GitHub repositories.
b9db8ed fix(lib): generate correct stub patterns for unmatched steps with quoted strings