Microsoft.AspNetCore.Testing
8.3.0
Prefix Reserved
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 Microsoft.AspNetCore.Testing --version 8.3.0
NuGet\Install-Package Microsoft.AspNetCore.Testing -Version 8.3.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="Microsoft.AspNetCore.Testing" Version="8.3.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Microsoft.AspNetCore.Testing --version 8.3.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Microsoft.AspNetCore.Testing, 8.3.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.
// Install Microsoft.AspNetCore.Testing as a Cake Addin #addin nuget:?package=Microsoft.AspNetCore.Testing&version=8.3.0 // Install Microsoft.AspNetCore.Testing as a Cake Tool #tool nuget:?package=Microsoft.AspNetCore.Testing&version=8.3.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Microsoft.AspNetCore.Testing
This package provides test fakes for integration testing of ASP.NET Core applications.
In particular:
IWebHostBuilder
extensions to setup the test web app.IHost
extensions 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 | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net6.0
- No dependencies.
-
net8.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Microsoft.AspNetCore.Testing:
Package | Downloads |
---|---|
Dazinator.AspNet.Extensions.FileProviders.Tests
Package Description |
GitHub repositories (29)
Showing the top 5 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
|
Version | Downloads | Last updated |
---|---|---|
9.0.0 | 355 | 11/12/2024 |
9.0.0-preview.9.24507.7 | 183 | 10/8/2024 |
9.0.0-preview.8.24460.1 | 91 | 9/10/2024 |
9.0.0-preview.7.24412.10 | 113 | 8/14/2024 |
9.0.0-preview.6.24353.1 | 87 | 7/10/2024 |
9.0.0-preview.5.24311.7 | 87 | 6/11/2024 |
9.0.0-preview.4.24271.2 | 91 | 5/21/2024 |
9.0.0-preview.3.24209.3 | 444 | 4/11/2024 |
9.0.0-preview.2.24157.4 | 81 | 3/12/2024 |
9.0.0-preview.1.24108.1 | 117 | 2/13/2024 |
8.10.0 | 1,607 | 10/8/2024 |
8.9.1 | 1,214 | 9/6/2024 |
8.9.0 | 114 | 9/5/2024 |
8.8.0 | 1,363 | 8/13/2024 |
8.7.0 | 1,262 | 7/10/2024 |
8.6.0 | 1,331 | 6/11/2024 |
8.5.0 | 836 | 5/14/2024 |
8.4.0 | 616 | 4/9/2024 |
8.3.0 | 1,826 | 3/12/2024 |
8.2.0 | 477 | 2/13/2024 |
8.1.0 | 586 | 1/9/2024 |
8.0.0 | 710 | 11/14/2023 |
8.0.0-rtm.23558.11 | 84 | 11/14/2023 |
8.0.0-rc.2.23510.2 | 117 | 10/10/2023 |
8.0.0-rc.1.23453.1 | 206 | 9/12/2023 |
8.0.0-preview.7.23407.5 | 343 | 8/8/2023 |