Namespace TinyBDD
Classes
- Ambient
Provides access to the ambient ScenarioContext used by the fluent Flow API.
- AmbientTestMethodResolver
Provides an ambient (per-async-flow) implementation of ITestMethodResolver that stores the current test MethodInfo in an AsyncLocal<T>.
- AssemblyFixture
Base class for assembly-wide setup and teardown that executes once per test assembly.
- AssemblyFixtureCoordinator
Coordinates the lifecycle of assembly-wide fixtures across the entire test assembly.
- AssemblySetupAttribute
Marks a type as an assembly-wide fixture that should be initialized before any tests run.
- Bdd
Entry points for creating a ScenarioContext and starting fluent Given/When/Then chains.
- BddStepException
Represents an exception that occurs during a BDD (Behavior-Driven Development) step execution. This class is used to wrap exceptions occurring during the execution of BDD steps, including information about the failed step context such as its kind and title.
- DisableOptimizationAttribute
Disables compile-time source generation optimization for a test method.
- ExampleResult
Represents the result of a single example execution in a data-driven scenario.
- ExampleRow<TExample>
Represents a single row of example data for data-driven scenarios.
- ExamplesBuilder<TExample>
Fluent builder for data-driven scenarios that executes a scenario template for each example row.
- ExamplesResult
Aggregated result from data-driven scenario execution.
- FeatureAttribute
Marks a test class as a BDD
Feature, providing a human-friendly name and an optional description.
- GenerateOptimizedAttribute
Explicitly marks a test method for compile-time optimization via Roslyn source generation.
- GherkinFormatter
Formats a ScenarioContext into Gherkin-style text and writes it to an IBddReporter.
- NullTraitBridge
No-op implementation of ITraitBridge used when no host test framework integration is desired. Tags are ignored.
- ScenarioAttribute
Marks a test method as a BDD
Scenario, optionally providing a friendly name and tags.
- ScenarioCaseAttribute
Specifies a set of values for a data-driven scenario. Multiple instances of this attribute can be applied to a single test method to execute the scenario with different data sets.
- ScenarioChain<T>
Represents a fluent chain starting at
Givenand flowing throughWhen,And,But, and intoThenwhere it becomes an awaitable ThenChain<T>.
- ScenarioContext
Holds feature, scenario and step information during a single BDD run.
- ScenarioContextAsserts
Assertion helpers for verifying the outcome of a recorded scenario.
- ScenarioContextGherkinExtensions
Extension methods for writing a ScenarioContext in Gherkin format via an IBddReporter.
- ScenarioOutlineBuilder<TExample>
Represents a Gherkin-style scenario outline that can be executed with multiple example rows.
- ScenarioOutlineChain<TExample, T>
Represents a scenario outline chain with a current value type.
- ScenarioOutlineTerminal<TExample, T>
Represents a terminal scenario outline that can be executed with examples.
- StepIO
Captures the input and output state for a single BDD step execution.
- StepInfo
Metadata about a step that is about to execute or has executed.
- StepResult
Represents a single executed step in a scenario (Given/When/Then/And/But), including title, elapsed time, and any error captured.
- StringBddReporter
Reports BDD test execution results by appending formatted strings to an internal buffer. This reporter captures feature/step information during scenario execution, providing a compact text representation of the tests performed.
- TagAttribute
Declares a tag on a feature class or scenario method. Tags are recorded in Tags and forwarded to the active ITraitBridge so test frameworks can expose them as categories/traits.
- TestBase
Minimal, framework-agnostic base class for TinyBDD tests that wires the ambient ScenarioContext and offers convenience
Givenhelpers.
- TestBase<TBackground>
A strongly-typed base class for TinyBDD tests with typed background state.
- TinyBddExtensibilityOptions
Configuration options for TinyBDD scenarios with extensibility support.
- TinyBddOptionsBuilder
Fluent builder for configuring TinyBDD with observers, output options, and extensibility features.
Structs
- FromContext
Helper that allows starting
Givenchains against an explicit ScenarioContext, instead of relying on Current.
- ThenChain<T>
Represents a chain of
Thenassertions that can be further extended withAnd/Butand awaited to execute the recorded scenario.
Interfaces
- IBddReporter
Defines a BDD (Behavior-Driven Development) test reporter that reports feature execution in a Given/When/Then style.
Implementations of this interface can integrate with different testing frameworks such as NUnit, xUnit, or MSTest, providing consistent reporting across tools.
- IScenarioObserver
Observes scenario-level lifecycle events during execution.
- IStepObserver
Observes step-level lifecycle events during scenario execution.
- ITestMethodResolver
Provides an abstraction for resolving the currently executing test method.
- ITraitBridge
Abstraction for mapping TinyBDD scenario tags to the host test framework's notion of categories/traits.
Enums
- StepPhase
Identifies the high-level BDD phase of a step:
Given,When, orThen.
- StepWord
Identifies the BDD connective used for a step within a phase: primary keyword,
And, orBut.