BddDotNet 3.0.0
dotnet add package BddDotNet --version 3.0.0
NuGet\Install-Package BddDotNet -Version 3.0.0
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="BddDotNet" Version="3.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="BddDotNet" Version="3.0.0" />
<PackageReference Include="BddDotNet" />
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 BddDotNet --version 3.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: BddDotNet, 3.0.0"
#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 BddDotNet@3.0.0
#: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=BddDotNet&version=3.0.0
#tool nuget:?package=BddDotNet&version=3.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Overview
Modern BDD framework for C# and .NET with Gherkin support
Gherkin syntax example
Feature: Guess the word
# The first example has two steps
Scenario: Maker starts a game
When the Maker starts a game
Then the Maker waits for a Breaker to join
# The second example has three steps
Scenario: Breaker joins a game
Given the Maker has started a game with the word "silky"
When the Breaker joins the Maker's game
Then the Breaker must guess a word with 5 characters
C# syntax scenario example
Program.cs content:
using BddDotNet;
using BddDotNet.Scenarios;
using BddDotNet.Steps;
using Microsoft.Testing.Platform.Builder;
var builder = await TestApplication.CreateBuilderAsync(args);
var services = builder.AddBddDotNet();
services.Scenario("feature1", "scenario1", async scenario =>
{
await scenario.Given("this is given step");
await scenario.When("this is when step");
await scenario.Then("this is then step");
});
services.Given(new("this is given step"), () =>
{
Console.WriteLine("This is the given step.");
});
services.When(new("this is when step"), () =>
{
Console.WriteLine("This is the when step.");
});
services.Then(new("this is then step"), () =>
{
Console.WriteLine("This is the then step.");
});
using var testApp = await builder.BuildAsync();
return await testApp.RunAsync();
More info: https://github.com/Romfos/BddDotNet
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- Microsoft.Extensions.DependencyInjection (>= 10.0.3)
- Microsoft.Testing.Platform (>= 2.3.3)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on BddDotNet:
| Package | Downloads |
|---|---|
|
AutoTests.Framework
BddDotNet based autotest framework |
|
|
BddDotNet.Gherkin.CSharpExpressions
Modern BDD framework for c# and .NET with gherkin support |
|
|
BddDotNet.Gherkin.Models
Modern BDD framework for c# and .NET with gherkin support |
GitHub repositories
This package is not used by any popular GitHub repositories.