Microsoft.AspNetCore.Testing
v10.11.0Latest Stable
net10.0net8.0net9.0
Experimental package. Test fakes for integration testing
Published
Oct 14, 2026
4d ago
Total Downloads
125.2K
125,194
Install
dotnet add package Microsoft.AspNetCore.Testing --version 10.11.0
| Product | Versions |
|---|---|
| .NET |
README
Microsoft.AspNetCore.Testing
This package provides test fakes for integration testing of ASP.NET Core applications.
In particular:
IWebHostBuilderextensions to setup the test web app.IHostextensions to access that test web app.
Install the package
From the command-line:
dotnet add package Microsoft.AspNetCore.Testing
Or directly in the C# project file:
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Testing" Version="[CURRENTVERSION]" />
</ItemGroup>
Usage Example
Creating a Test Web App
The IWebHostBuilder extensions can help set up a host for testing.
using var host = await FakeHost.CreateBuilder()
.ConfigureWebHost(webHost => webHost.UseFakeStartup().ListenHttpOnAnyPort())
.StartAsync();
Accessing the test Web App
The IHost extensions can help access the test host that was created above.
using var client = host.CreateClient();
var response = await client.GetAsync("/");
Feedback & Contributing
We welcome feedback and contributions in our GitHub repo.
Changes from Previous Version
No structural changes between v10.10.0 and v10.11.0.
Adoption Assessment
A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.
Compatibility metadata lists 3 target frameworks; confirm the exact target used by your application.
Related Guides & Workflows
Learn how to evaluate, integrate, or audit this package in your .NET project.