C# · native + browser WebAssembly

Keep the suite C#.

Use the dependency-free .NET 8 core natively, then publish the existing parameterless MSTest inventory as a .NET 10 browser WebAssembly AppBundle. One C# test assembly supplies both lanes.

Native

.NET owns the core path.

gh release download 2.1.3 --repo RIAEvangelist/vanilla-test --pattern '*.nupkg' --dir ./packages
dotnet add package vanilla-test --version 2.1.0 --source ./packages
dotnet test

VanillaTestSuite is a small net8.0 state machine with PascalCase lifecycle methods, typed errors, and an immutable cached result. The package has no third-party runtime dependency.

Browser

One command emits the AppBundle.

dotnet workload install wasm-tools
dotnet tool install --global vanilla-test.tool --version 2.1.0 --add-source ./packages
dotnet vanilla-test --browser

The .NET 10 tool generates a multi-file browser-wasm host beside the selected MSTest project. The page imports the runtime, runs the existing parameterless methods once, and exposes both on-page checks and captured console output.

Contract

A small native state machine.

One active case, exact unique descriptions, first decision wins, undecided completion fails, and reporting seals the suite. C# uses standard exceptions and read-only collections instead of copying another runtime's surface.

Start

C# guide

Install the package, run native MSTest, provision wasm-tools, publish the browser AppBundle, and deploy every generated file.

Open the C# guide →
Copy

C# examples

Complete lifecycle code, an MSTest class, browser commands, and a compatible custom page.

Open C# examples →
API

C# API reference

Public classes, PascalCase methods, immutable result fields, typed lifecycle errors, and browser CLI options.

Open the C# API →
Coverage

Native source coverage

Review the enforced 100% line and branch evidence for the core assembly without conflating it with browser compatibility.

Open C# coverage →
Packages

Library and tool

vanilla-test 2.1.0 is the .NET 8 core. vanilla-test.tool 2.1.0 is the .NET 10 browser builder. Both are currently GitHub release assets, not NuGet.org packages.

Open the package assets →
Evidence

Native and browser gates

CI runs the seven core MSTest methods—including Behavioral coverage—natively, verifies package and tool behavior, then executes that core inventory inside the published AppBundle.

Review C# testing →
The host boundary is explicit.

Stable MSTest 4.3.3 does not provide the Microsoft.Testing.Platform browser path this lane requires. The tool does not run MTP. It generates a compact reflection host for public, parameterless [TestMethod] methods and leaves full adapter services on the native path.

Commit-anchored native + browser benchmark.

One C# harness runs the aligned one-million-case, 1,000-suite workload in native .NET and browser WebAssembly. Inspect every sample and the exact source/runtime provenance. Run it in this browser.