TinyBDD — Fluent BDD for .NET, zero ceremony

Write expressive Given/When/Then tests that feel great and run anywhere (xUnit, NUnit, MSTest) without framework lock-in.

xUnit NUnit MSTest Async-first Gherkin output
TinyBDD

Why TinyBDD

Tiny, readable core

Understand the engine in minutes and keep it close to your tests.

Fluent, async-first

Given/When/Then chains with async built in for modern test flows.

Deferred expectations

Compose reasons and hints, throw only when awaited.

Step IO lineage

Track inputs, outputs, and the current item across steps.

Assertion agnostic

Works with any assertion library you already use.

Adapters included

Optional adapters for xUnit, NUnit, and MSTest.

Gherkin reporting

Readable Given/When/Then output right in your test results.

Try it in 30 seconds

Ambient (with adapter base class or Ambient.Current set):

```csharp await Given(() => 1) .When("double", x => x * 2) .Then("== 2", v => v == 2) .AssertPassed(); ```

Explicit (no base class required):

```csharp var ctx = Bdd.CreateContext(this); await Bdd.Given(ctx, "numbers", () => new[]{1,2,3}) .When("sum", (arr, _) => Task.FromResult(arr.Sum())) .Then("> 0", sum => sum > 0) .AssertPassed(); ```

Documentation Map

Tip: add [Feature], [Scenario], and [Tag] to make reports shine. Base classes emit Gherkin output automatically.