Microsoft.AspNetCore.Testing
10.6.0
Prefix Reserved
dotnet add package Microsoft.AspNetCore.Testing --version 10.6.0
NuGet\Install-Package Microsoft.AspNetCore.Testing -Version 10.6.0
<PackageReference Include="Microsoft.AspNetCore.Testing" Version="10.6.0" />
<PackageVersion Include="Microsoft.AspNetCore.Testing" Version="10.6.0" />
<PackageReference Include="Microsoft.AspNetCore.Testing" />
paket add Microsoft.AspNetCore.Testing --version 10.6.0
#r "nuget: Microsoft.AspNetCore.Testing, 10.6.0"
#:package Microsoft.AspNetCore.Testing@10.6.0
#addin nuget:?package=Microsoft.AspNetCore.Testing&version=10.6.0
#tool nuget:?package=Microsoft.AspNetCore.Testing&version=10.6.0
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.
| 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 is compatible. 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. |
-
net10.0
- No dependencies.
-
net8.0
- No dependencies.
-
net9.0
- No dependencies.
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Microsoft.AspNetCore.Testing:
| Package | Downloads |
|---|---|
|
Dazinator.AspNet.Extensions.FileProviders.Tests
Package Description |
|
|
xSdk.Extensions.AspNetCore
xSdk.Extensions.AspNetCore - ASP.NET Core extensions for the xSdk project. |
GitHub repositories (29)
Showing the top 20 popular GitHub repositories that depend on Microsoft.AspNetCore.Testing:
| Repository | Stars |
|---|---|
|
aspnet/Mvc
[Archived] ASP.NET Core MVC is a model view controller framework for building dynamic web sites with clean separation of concerns, including the merged MVC, Web API, and Web Pages w/ Razor. Project moved to https://github.com/aspnet/AspNetCore
|
|
|
aspnet/KestrelHttpServer
[Archived] A cross platform web server for ASP.NET Core. Project moved to https://github.com/aspnet/AspNetCore
|
|
|
aspnet/SignalR
[Archived] Incredibly simple real-time web for ASP.NET Core. Project moved to https://github.com/aspnet/AspNetCore
|
|
|
aspnet/Identity
[Archived] ASP.NET Core Identity is the membership system for building ASP.NET Core web applications, including membership, login, and user data. Project moved to https://github.com/aspnet/AspNetCore
|
|
|
aspnet/Security
[Archived] Middleware for security and authorization of web apps. Project moved to https://github.com/aspnet/AspNetCore
|
|
|
aspnet/Razor
[Archived] Parser and code generator for CSHTML files used in view pages for MVC web apps. Project moved to https://github.com/aspnet/AspNetCore
|
|
|
aspnet/DependencyInjection
[Archived] Contains common DI abstractions that ASP.NET Core and Entity Framework Core use. Project moved to https://github.com/aspnet/Extensions
|
|
|
aspnet/Entropy
A chaotic experimental playground for new features and ideas - check here for small and simple samples for individual features.
|
|
|
aspnet/Hosting
[Archived] Code for hosting and starting up an ASP.NET Core application. Project moved to https://github.com/aspnet/Extensions and https://github.com/aspnet/AspNetCore
|
|
|
aspnet/Logging
[Archived] Common logging abstractions and a few implementations. Project moved to https://github.com/aspnet/Extensions
|
|
|
aspnet/Caching
[Archived] Libraries for in-memory caching and distributed caching. Project moved to https://github.com/aspnet/Extensions
|
|
|
Azure/azure-signalr
Azure SignalR Service SDK for .NET
|
|
|
aspnet/DotNetTools
[Archived] Various .NET command line tools. Project moved to https://github.com/aspnet/AspNetCore
|
|
|
aspnet/HttpAbstractions
[Archived] HTTP abstractions such as HttpRequest, HttpResponse, and HttpContext, as well as common web utilities. Project moved to https://github.com/aspnet/AspNetCore
|
|
|
aspnet/WebSockets
[Archived] Implementation of the WebSocket protocol, along with client and server integration components.
|
|
|
aspnet/Configuration
[Archived] Interfaces and providers for accessing configuration files. Project moved to https://github.com/aspnet/Extensions
|
|
|
aspnet/Routing
[Archived] Middleware for routing requests to application logic. Project moved to https://github.com/aspnet/AspNetCore
|
|
|
aspnet/HttpClientFactory
[Archived] Contains an opinionated factory for creating HttpClient instances. Project moved to https://github.com/aspnet/Extensions
|
|
|
aspnet/Diagnostics
[Archived] Diagnostics middleware for reporting info and handling exceptions and errors in ASP.NET Core, and diagnosing Entity Framework Core migrations errors. Project moved to https://github.com/aspnet/AspNetCore
|
|
|
aspnet/Templating
[Archived] ASP.NET Core templates for .NET CLI and Visual Studio. Project moved to https://github.com/aspnet/AspNetCore
|
| Version | Downloads | Last Updated |
|---|---|---|
| 10.6.0 | 0 | 5/12/2026 |
| 10.5.0 | 1,408 | 4/15/2026 |
| 10.4.0 | 1,790 | 3/10/2026 |
| 10.3.0 | 1,544 | 2/10/2026 |
| 10.2.0 | 1,963 | 1/13/2026 |
| 10.1.0 | 3,297 | 12/9/2025 |
| 10.0.0 | 1,985 | 11/11/2025 |
| 9.10.0 | 1,401 | 10/14/2025 |
| 9.9.0 | 5,579 | 9/9/2025 |
| 9.8.0 | 1,333 | 8/12/2025 |
| 9.7.0 | 2,938 | 7/8/2025 |
| 9.6.0 | 1,274 | 6/10/2025 |
| 9.5.0 | 1,235 | 5/13/2025 |
| 9.4.0 | 1,675 | 4/8/2025 |
| 9.3.0 | 3,989 | 3/11/2025 |
| 9.2.0 | 2,737 | 2/11/2025 |
| 9.1.0 | 5,557 | 1/14/2025 |
| 9.0.0 | 1,660 | 11/12/2024 |
| 9.0.0-preview.9.24507.7 | 241 | 10/8/2024 |
| 8.10.0 | 7,650 | 10/8/2024 |