Table of Contents

Class TinyBddMsTestBase

Namespace
TinyBDD.MSTest
Assembly
TinyBDD.MSTest.dll

Base class for MSTest that initializes TinyBDD ambient context and writes a Gherkin report after each test.

[Feature("Unnamed Feature", null)]
public abstract class TinyBddMsTestBase : TestBase
Inheritance
TinyBddMsTestBase
Inherited Members

Remarks

In TinyBdd_Init(), this class creates a ScenarioContext, sets Current, and wires an MsTestTraitBridge. In TinyBdd_Cleanup(), it emits a Gherkin report and clears the ambient context.

Feature-level setup/teardown is supported via ConfigureFeatureSetup() and ConfigureFeatureTeardown(). These run once per test class, managed automatically in TinyBdd_Init().

Properties

Reporter

The reporter used to emit scenario output (e.g., Gherkin-style summaries) at cleanup. Framework-specific base classes should provide an appropriate implementation.

protected override IBddReporter Reporter { get; }

Property Value

IBddReporter

TestContext

Provided by MSTest; used for logging and trait bridging.

public TestContext TestContext { get; set; }

Property Value

TestContext

Methods

TinyBdd_Cleanup()

Writes a Gherkin report and clears the ambient context.

[TestCleanup]
public void TinyBdd_Cleanup()

TinyBdd_Init()

Initializes the TinyBDD ambient context and trait bridge.

[TestInitialize]
public void TinyBdd_Init()

Remarks

If you override ConfigureBackground(), call ExecuteBackgroundAsync(CancellationToken) at the start of your test or in a derived [TestInitialize] method.