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
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Gherkin.Generator.Utils" Version="0.1.9" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Gherkin.Generator.Utils" Version="0.1.9" />
                    
Directory.Packages.props
<PackageReference Include="Gherkin.Generator.Utils" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Gherkin.Generator.Utils --version 0.1.9
                    
#r "nuget: Gherkin.Generator.Utils, 0.1.9"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Gherkin.Generator.Utils@0.1.9
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Gherkin.Generator.Utils&version=0.1.9
                    
Install as a Cake Addin
#tool nuget:?package=Gherkin.Generator.Utils&version=0.1.9
                    
Install as a Cake Tool

Gherkin.Generator

CI codecov NuGet .NET Standard 2.0 License: MIT

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 .feature files 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

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .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.

Version Downloads Last Updated
0.1.9 224 1/10/2026
0.1.8 121 1/10/2026
0.1.7 134 1/10/2026
0.1.6 124 1/10/2026
0.1.5 183 1/7/2026
0.1.4 130 1/6/2026
0.1.3 124 1/6/2026

b9db8ed fix(lib): generate correct stub patterns for unmatched steps with quoted strings