SpawnDev.UnitTesting.Blazor
2.2.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package SpawnDev.UnitTesting.Blazor --version 2.2.0
NuGet\Install-Package SpawnDev.UnitTesting.Blazor -Version 2.2.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SpawnDev.UnitTesting.Blazor" Version="2.2.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SpawnDev.UnitTesting.Blazor" Version="2.2.0" />
<PackageReference Include="SpawnDev.UnitTesting.Blazor" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add SpawnDev.UnitTesting.Blazor --version 2.2.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: SpawnDev.UnitTesting.Blazor, 2.2.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package SpawnDev.UnitTesting.Blazor@2.2.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=SpawnDev.UnitTesting.Blazor&version=2.2.0
#tool nuget:?package=SpawnDev.UnitTesting.Blazor&version=2.2.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
NuGet
| Package | Description | Link |
|---|---|---|
| SpawnDev.UnitTesting | Cross-platform unit testing framework | |
| SpawnDev.UnitTesting.Blazor | Blazor UI components for SpawnDev.UnitTesting |
SpawnDev.UnitTesting
A lightweight, cross-platform unit testing framework for .NET. Works everywhere — Blazor WASM, WPF, Console, and more.
Supersedes SpawnDev.Blazor.UnitTesting with a platform-agnostic core.
Features
- Cross-platform — no Blazor, WPF, or browser dependencies in the core library
- Simple API —
[TestMethod]attribute andUnitTestRunnerfor reflection-based discovery - Async support — full
async Tasktest methods with configurable timeouts - Unsupported tests — throw
UnsupportedTestExceptionto skip tests gracefully - Blazor UI —
SpawnDev.UnitTesting.BlazorprovidesUnitTestsViewRazor component
Quick Start
1. Create test classes
using SpawnDev.UnitTesting;
public class MyTests
{
[TestMethod]
public async Task AdditionTest()
{
int result = 1 + 1;
if (result != 2) throw new Exception($"Expected 2, got {result}");
}
[TestMethod]
public async Task UnsupportedFeatureTest()
{
throw new UnsupportedTestException("Feature not available on this platform");
}
}
2. Run tests programmatically
var runner = new UnitTestRunner();
runner.SetTestTypes(new[] { typeof(MyTests) });
runner.TestStatusChanged += () => Console.WriteLine($"Progress: {runner.Tests.Count(t => t.State == TestState.Done)}/{runner.Tests.Count}");
await runner.RunTests();
3. Blazor UI (SpawnDev.UnitTesting.Blazor)
@using SpawnDev.UnitTesting.Blazor
<UnitTestsView TestAssemblies="_assemblies"></UnitTestsView>
@code {
IEnumerable<Assembly>? _assemblies = new List<Assembly> {
typeof(MyTests).Assembly
};
}
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net10.0
- SpawnDev.BlazorJS (>= 3.3.0)
- SpawnDev.UnitTesting (>= 2.2.0)
-
net8.0
- SpawnDev.BlazorJS (>= 3.3.0)
- SpawnDev.UnitTesting (>= 2.2.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.5.7 | 131 | 6/30/2026 |
| 2.5.6 | 136 | 6/1/2026 |
| 2.5.3 | 128 | 5/25/2026 |
| 2.5.2 | 199 | 4/24/2026 |
| 2.5.0 | 167 | 3/30/2026 |
| 2.4.2 | 150 | 3/26/2026 |
| 2.4.1 | 111 | 3/26/2026 |
| 2.4.0 | 131 | 3/19/2026 |
| 2.3.1 | 144 | 3/14/2026 |
| 2.3.0 | 116 | 3/14/2026 |
| 2.2.1 | 123 | 3/13/2026 |
| 2.2.0 | 115 | 3/13/2026 |
| 2.1.0 | 124 | 3/7/2026 |
| 2.0.0 | 121 | 3/4/2026 |
| 1.0.0 | 126 | 2/21/2026 |