BorsukSoftware.Testing.BDD
1.0.0
Prefix Reserved
dotnet add package BorsukSoftware.Testing.BDD --version 1.0.0
NuGet\Install-Package BorsukSoftware.Testing.BDD -Version 1.0.0
<PackageReference Include="BorsukSoftware.Testing.BDD" Version="1.0.0" />
<PackageVersion Include="BorsukSoftware.Testing.BDD" Version="1.0.0" />
<PackageReference Include="BorsukSoftware.Testing.BDD" />
paket add BorsukSoftware.Testing.BDD --version 1.0.0
#r "nuget: BorsukSoftware.Testing.BDD, 1.0.0"
#:package BorsukSoftware.Testing.BDD@1.0.0
#addin nuget:?package=BorsukSoftware.Testing.BDD&version=1.0.0
#tool nuget:?package=BorsukSoftware.Testing.BDD&version=1.0.0
BorsukSoftware.Testing.BDD
This project provides a series of utility classes to support Behavior Driven Development (BDD) style integration testing in .NET projects.
Due to the nature of integration tests, where each system being tested may have different requirements and setup, this library focuses on providing a flexible framework for defining and executing test steps, rather than a rigid testing structure. We provide a sample usage application to demonstrate how to use the library effectively / provide a reference implementation to simplify the creation of appropriate tooling for your projects.
Note that we have extended the Cucumber language to allow, by convention, more complicated step definitions. This allows for a more expressive and powerful way to define test steps, while still adhering to the principles of BDD. This level of granularity might not be necessary for all projects, but it can be very useful in complex integration testing scenarios where the product being tested actually requires some of that internal knowledge.
Each step definition is a static method, decorated with a [Step("step text")]
attribute. The step text can include parameters, denoted by curly braces {}
. The method will also take a user-defined and supplied context object which manages the state for the test as well as connection details for any external services required (e.g. DBs, APIs, Selenium / Appium instances). Body parameters are denoted by the [FromBody]
attribute.
The StepFactory is the key component of the library.
Usage
We provide a sample usage application and will update this README with more information soon.
Sample Step Definition
public static class ProductSteps
{
[Step("admin user creates a product with alias {productAlias}")]
public static async Task AdminUserCreatesProduct2(
IIntegrationTestContext context,
string productAlias,
[FromBody] Steps.Models.NewProductModel productModel)
{
// Implementation here
}
}
Sample set up code
var stepFactory = new BorsukSoftware.Testing.BDD.StepFactory<IIntegrationTestContext>();
stepFactory.RegisterAssembly(typeof(IntegrationTestRunner).Assembly);
Sample test execution code
// Populate your context with any required data
var context = new IntegrationTestContext();
foreach (var step in stepsToRun)
{
Console.WriteLine($" => '{step.Text}'");
await stepFactory.Process(testContext, step.Text, step.Argument);
}
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 | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | 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.1
- Gherkin (>= 33.1.0)
- System.Text.Json (>= 9.0.8)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
1.0.0 | 17 | 9/18/2025 |