SnowBank.Testing.Framework
7.4.2
dotnet add package SnowBank.Testing.Framework --version 7.4.2
NuGet\Install-Package SnowBank.Testing.Framework -Version 7.4.2
<PackageReference Include="SnowBank.Testing.Framework" Version="7.4.2" />
<PackageVersion Include="SnowBank.Testing.Framework" Version="7.4.2" />
<PackageReference Include="SnowBank.Testing.Framework" />
paket add SnowBank.Testing.Framework --version 7.4.2
#r "nuget: SnowBank.Testing.Framework, 7.4.2"
#:package SnowBank.Testing.Framework@7.4.2
#addin nuget:?package=SnowBank.Testing.Framework&version=7.4.2
#tool nuget:?package=SnowBank.Testing.Framework&version=7.4.2
SnowBank.Testing.Framework
An SDK for writing integration tests for distributed .NET applications: spin up several simulated hosts on an in-memory virtual network inside a single test, with all of their traffic routed in-process, and no real sockets, ports, or containers.
Concept
Derive your fixture from DistributedTest and describe a topology with MakeItSo: virtual LANs, web hosts, agents and services. Each one is a real host, built the way your production hosts are (DI, minimal APIs, SignalR, ...), but wired onto a virtual network instead of real sockets. The framework records everything into a single, ordered timeline journal that is printed with the test output, so a failure spread across several hosts reads as one coherent story.
How to use
dotnet add package SnowBank.Testing.Framework
public class MyFacts : DistributedTest
{
[Test]
public async Task Two_Hosts_On_A_Virtual_Lan()
{
var context = await MakeItSo(env => env.AddSimpleLan(lan =>
{
// a simulated web host, configured like a real one
lan.WithMinimalWebHost("WEB", host =>
{
host.ConfigureApplication(app => app.MapGet("/ping", () => "pong"));
});
}));
var web = context.GetWebHost("WEB");
// `web` is a real host reachable over the virtual network; exercise it from another
// host, an HTTP client, or a browser (see SnowBank.Testing.Framework.Playwright)
Assert.That(web.GetUri("/ping"), Is.Not.Null);
}
}
Add a real Chromium to the same network with the companion SnowBank.Testing.Framework.Playwright package (lan.WithPlaywrightBrowser(...)).
For the timeline-journal format, per-host log levels, always-on HTTP packet capture and the other diagnostics, see the
snowbank-distributed-testingguidance in the repository.
| 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. net11.0 is compatible. |
-
net10.0
- Grpc.AspNetCore (>= 2.80.0)
- Grpc.Tools (>= 2.81.1)
- Microsoft.AspNetCore.Mvc.Testing (>= 10.0.9)
- Microsoft.AspNetCore.SignalR.Client (>= 10.0.9)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.9)
- Microsoft.Extensions.DependencyInjection (>= 10.0.9)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.9)
- Microsoft.Extensions.Hosting (>= 10.0.9)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.9)
- Microsoft.Extensions.Http (>= 10.0.9)
- Microsoft.Extensions.Logging (>= 10.0.9)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.9)
- Microsoft.Extensions.Logging.Configuration (>= 10.0.9)
- Microsoft.Extensions.Options (>= 10.0.9)
- Microsoft.Extensions.TimeProvider.Testing (>= 8.10.0)
- Microsoft.IO.RecyclableMemoryStream (>= 3.0.1)
- Microsoft.Net.Http.Headers (>= 10.0.9)
- Microsoft.NET.Test.Sdk (>= 18.7.0)
- Microsoft.TestPlatform.TestHost (>= 18.7.0)
- Newtonsoft.Json (>= 13.0.4)
- NodaTime (>= 3.3.2)
- NodaTime.Testing (>= 3.3.2)
- NUnit (>= 4.6.1)
- NUnit.Console (>= 3.22.0)
- NUnit.ConsoleRunner (>= 3.22.0)
- OpenTelemetry.Api (>= 1.16.0)
- OpenTelemetry.Exporter.OpenTelemetryProtocol (>= 1.16.0)
- SnowBank.Networking.PacketCapture (>= 7.4.2)
- SnowBank.Testing.Common (>= 7.4.2)
- StructuredFieldValues (>= 0.7.7)
- System.Configuration.ConfigurationManager (>= 10.0.9)
- System.IO.Hashing (>= 10.0.9)
-
net11.0
- Grpc.AspNetCore (>= 2.80.0)
- Grpc.Tools (>= 2.81.1)
- Microsoft.AspNetCore.Mvc.Testing (>= 11.0.0-preview.5.26302.115)
- Microsoft.AspNetCore.SignalR.Client (>= 11.0.0-preview.5.26302.115)
- Microsoft.Extensions.Configuration.Binder (>= 11.0.0-preview.5.26302.115)
- Microsoft.Extensions.DependencyInjection (>= 11.0.0-preview.5.26302.115)
- Microsoft.Extensions.Hosting (>= 11.0.0-preview.5.26302.115)
- Microsoft.Extensions.Http (>= 11.0.0-preview.5.26302.115)
- Microsoft.Extensions.Logging (>= 11.0.0-preview.5.26302.115)
- Microsoft.Extensions.Logging.Configuration (>= 11.0.0-preview.5.26302.115)
- Microsoft.Extensions.TimeProvider.Testing (>= 8.10.0)
- Microsoft.IO.RecyclableMemoryStream (>= 3.0.1)
- Microsoft.Net.Http.Headers (>= 11.0.0-preview.5.26302.115)
- Microsoft.NET.Test.Sdk (>= 18.7.0)
- Microsoft.TestPlatform.TestHost (>= 18.7.0)
- Newtonsoft.Json (>= 13.0.4)
- NodaTime (>= 3.3.2)
- NodaTime.Testing (>= 3.3.2)
- NUnit (>= 4.6.1)
- NUnit.Console (>= 3.22.0)
- NUnit.ConsoleRunner (>= 3.22.0)
- OpenTelemetry.Api (>= 1.16.0)
- OpenTelemetry.Exporter.OpenTelemetryProtocol (>= 1.16.0)
- SnowBank.Networking.PacketCapture (>= 7.4.2)
- SnowBank.Testing.Common (>= 7.4.2)
- StructuredFieldValues (>= 0.7.7)
- System.Configuration.ConfigurationManager (>= 11.0.0-preview.5.26302.115)
- System.IO.Hashing (>= 11.0.0-preview.5.26302.115)
-
net8.0
- Grpc.AspNetCore (>= 2.80.0)
- Grpc.Tools (>= 2.81.1)
- Microsoft.AspNetCore.Mvc.Testing (>= 8.0.28)
- Microsoft.AspNetCore.SignalR.Client (>= 10.0.9)
- Microsoft.Bcl.TimeProvider (>= 10.0.9)
- Microsoft.Extensions.Configuration.Binder (>= 10.0.9)
- Microsoft.Extensions.DependencyInjection (>= 10.0.9)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.9)
- Microsoft.Extensions.Hosting (>= 10.0.9)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.9)
- Microsoft.Extensions.Http (>= 10.0.9)
- Microsoft.Extensions.Logging (>= 10.0.9)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.9)
- Microsoft.Extensions.Logging.Configuration (>= 10.0.9)
- Microsoft.Extensions.Options (>= 10.0.9)
- Microsoft.Extensions.TimeProvider.Testing (>= 8.10.0)
- Microsoft.IO.RecyclableMemoryStream (>= 3.0.1)
- Microsoft.Net.Http.Headers (>= 8.0.28)
- Microsoft.NET.Test.Sdk (>= 18.7.0)
- Microsoft.TestPlatform.TestHost (>= 18.7.0)
- Newtonsoft.Json (>= 13.0.4)
- NodaTime (>= 3.3.2)
- NodaTime.Testing (>= 3.3.2)
- NUnit (>= 4.6.1)
- NUnit.Console (>= 3.22.0)
- NUnit.ConsoleRunner (>= 3.22.0)
- OpenTelemetry.Api (>= 1.16.0)
- OpenTelemetry.Exporter.OpenTelemetryProtocol (>= 1.16.0)
- SnowBank.Networking.PacketCapture (>= 7.4.2)
- SnowBank.Testing.Common (>= 7.4.2)
- StructuredFieldValues (>= 0.7.7)
- System.Configuration.ConfigurationManager (>= 10.0.9)
- System.IO.Hashing (>= 10.0.9)
- System.IO.Pipelines (>= 10.0.9)
- System.Text.Json (>= 10.0.9)
- System.Threading.Channels (>= 10.0.9)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on SnowBank.Testing.Framework:
| Package | Downloads |
|---|---|
|
SnowBank.Testing.Framework.Playwright
Playwright-based virtual web browser test component for the SnowBank distributed-test framework |
GitHub repositories
This package is not used by any popular GitHub repositories.