Skip to main content

Consumer namespaces

The next major version moves test-authoring APIs into BDTest. Replace the imports below with using BDTest; and rebuild your tests and custom adapters. This is a source and binary breaking change; the old fully qualified type names are not compatibility aliases.

Previous namespaceTypes now in BDTest
BDTest.Test.Steps and its Given, When, Then subnamespacesAll concrete step kinds, StepBuilder, the three continuation bases, StepTypeExtensions
BDTest.AttributesStory, scenario, step text, retry, tag, skip and test-information attributes
BDTest.TestBDTestBase, AbstractContextBDTestBase<T>, BDTestBuilder, BDTestScenario, BuildableTest, RunnableStepBuilder, ScenarioOutlineBuilder<T>
BDTest.TestBDTestContext, ContextCreation, context factories/lifetime interfaces, ScenarioHookContext, structured step arguments and timeout/argument extensions
BDTest.NUnit, BDTest.xUnit, BDTest.MSTest, BDTest.TUnitAdapter bases, composition hosts/interfaces, lifecycle attributes/hooks and assembly-run helpers

For example, an NUnit test now needs one BDTest import alongside NUnit's own import:

using BDTest;
using NUnit.Framework;

public class Example : NUnitBDTestBase<object>
{
[Test, ScenarioText("A simple scenario")]
public async Task Runs()
{
await Given(() => { }).When(() => { }).Then(() => { });
}
}

Concrete return types remain unchanged: Given(...).And(...) returns AndGiven, and Then(...).But(...) returns ButThen. Custom adapters retain the protected lifecycle, startup-output, pending-execution and assertion-scope API. No additional friend assembly access is required.

Use using BDTest.Contracts; when explicitly naming immutable results such as ScenarioResult, StepResult, ScenarioDefinitionSummary, Status or StepType. These contracts retain their namespace; the namespace migration does not move them back into the execution package. The result migration is described in immutable execution results. Legacy mutable models remain in BDTest.Test for the report compatibility bridge. Report renderer/storage namespaces are unchanged.

Package IDs, assembly names, signing and target frameworks are unchanged. Install matching versions of the core, adapter and optional analyzer packages. The source generator now ships inside core; remove old standalone generator references. Update reflection strings, fully qualified names and custom compiler tooling that refer to the moved types; do not replace package references with namespace names.