2026-08-07 comparisondotnetaspnetcore WebApplicationFactory vs Testcontainers for ASP.NET Core integration tests Choose an ASP.NET Core integration-test setup by what it must prove: HTTP routing, production database behavior, or the published application image.
2026-08-07 comparisontestingxunit xUnit v3 vs NUnit vs MSTest in 2026: which should you pick? Pick xUnit v3 for greenfield .NET projects, NUnit 4.6 if you live in its constraint model, MSTest 4 if you already ship it. A measured comparison on .NET SDK 10.0.201 covering parallelism defaults, test class lifecycle, assertion failure output, and the Microsoft.Testing.Platform version conflict that breaks the NUnit runner.
2026-08-01 dotnetai-agentstesting The New .NET Unit-Test Agent's Best Idea Is Not Writing Tests On 2026-07-31 Microsoft shipped a polyglot unit-test agent in dotnet/skills. The interesting part is the mandatory pre-completion gate that pseudo-mutates your assertions before the agent is allowed to say it is done.
2026-07-26 csharpdotnetdotnet-11 How to test time-dependent code with TimeProvider and FakeTimeProvider in .NET 11 Replace DateTime.UtcNow, Stopwatch, and Task.Delay with System.TimeProvider so tests can control the clock: DI registration, FakeTimeProvider.Advance and SetUtcNow, testing timeouts and PeriodicTimer-based BackgroundServices, plus the Advance-continuation and xUnit v2 gotchas.
2026-07-26 csharpdotnetdotnet-11 How to write integration tests with WebApplicationFactory<T> in ASP.NET Core 11 A complete guide to WebApplicationFactory<TEntryPoint> in ASP.NET Core 11: making the Program entry point reachable, ConfigureTestServices vs ConfigureWebHost, replacing the EF Core registration through IDbContextOptionsConfiguration, the new ConfigureHostApplicationBuilder hook in .NET 11 preview 6, faking authentication, WebApplicationFactoryClientOptions, and UseKestrel when you need a real port.
2026-05-01 csharpdotnetdotnet-11 How to write integration tests against a real SQL Server with Testcontainers A complete guide to running ASP.NET Core integration tests against a real SQL Server 2022 using Testcontainers 4.11 and EF Core 11: WebApplicationFactory wiring, IAsyncLifetime, swapping the DbContext registration, applying migrations, parallelism, Ryuk cleanup, and CI gotchas.
2026-05-01 dotnet-11vstestnewtonsoft-json VSTest drops Newtonsoft.Json in .NET 11 Preview 4 and what breaks if you relied on it transitively .NET 11 Preview 4 and Visual Studio 18.8 ship a VSTest that no longer flows Newtonsoft.Json into your test projects. Builds that quietly used the transitive copy will break with a single PackageReference fix.
2026-04-26 ef-coreef-core-11dotnet-11 How to mock DbContext without breaking change tracking Mocking DbContext directly silently breaks ChangeTracker, which is why Microsoft discourages it. This guide shows the two patterns that actually work in EF Core 11: SQLite in-memory with a kept-open connection so the real ChangeTracker runs, and the repository pattern that lifts EF Core out of the test entirely.
2026-04-26 csharpdotnetdotnet-11 How to unit-test code that uses HttpClient A complete guide to testing HttpClient in .NET 11: why you should not mock HttpClient directly, how to write a stub HttpMessageHandler, swapping the primary handler with IHttpClientFactory, verifying Polly retries, and the WireMock.Net option.
2026-04-23 dotnet-11ef-core-11testing EF Core 11 Preview 3 Adds RemoveDbContext for Clean Test Provider Swaps EF Core 11 Preview 3 introduces RemoveDbContext, RemoveExtension, and a parameterless AddPooledDbContextFactory overload, removing the boilerplate around swapping providers in tests and centralizing pooled factory configuration.