![]() |
VOOZH | about |
dotnet add package Microsoft.AspNetCore.Mvc.Testing --version 10.0.9
NuGet\Install-Package Microsoft.AspNetCore.Mvc.Testing -Version 10.0.9
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="10.0.9" />
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="10.0.9" />Directory.Packages.props
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" />Project file
paket add Microsoft.AspNetCore.Mvc.Testing --version 10.0.9
#r "nuget: Microsoft.AspNetCore.Mvc.Testing, 10.0.9"
#:package Microsoft.AspNetCore.Mvc.Testing@10.0.9
#addin nuget:?package=Microsoft.AspNetCore.Mvc.Testing&version=10.0.9Install as a Cake Addin
#tool nuget:?package=Microsoft.AspNetCore.Mvc.Testing&version=10.0.9Install as a Cake Tool
Microsoft.AspNetCore.Mvc.Testing provides support for writing integration tests for ASP.NET Core apps that utilize MVC or Minimal APIs.
.deps.json) from the System Under Test (SUT) into the test project's bin directoryWebApplicationFactory class to streamline bootstrapping the SUT with TestServerTo use Microsoft.AspNetCore.Mvc.Testing, follow these steps:
To install the package, run the following command from the directory containing the test project file:
dotnet add package Microsoft.AspNetCore.Mvc.Testing
To configure the test app, follow these steps:
<Project Sdk="Microsoft.NET.Sdk.Web">).xunitxunit.runner.visualstudioMicrosoft.NET.Test.Sdkpublic class BasicTests
: IClassFixture<WebApplicationFactory<Program>>
{
private readonly WebApplicationFactory<Program> _factory;
public BasicTests(WebApplicationFactory<Program> factory)
{
_factory = factory;
}
[Theory]
[InlineData("/")]
[InlineData("/Index")]
[InlineData("/About")]
[InlineData("/Privacy")]
[InlineData("/Contact")]
public async Task Get_EndpointsReturnSuccessAndCorrectContentType(string url)
{
// Arrange
var client = _factory.CreateClient();
// Act
var response = await client.GetAsync(url);
// Assert
response.EnsureSuccessStatusCode(); // Status Code 200-299
Assert.Equal("text/html; charset=utf-8",
response.Content.Headers.ContentType.ToString());
}
}
For additional documentation and examples, refer to the official documentation on integration testing in ASP.NET Core.
Microsoft.AspNetCore.Mvc.Testing is released as open-source under the MIT license. Bug reports and contributions are welcome at the GitHub repository.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
Showing the top 5 NuGet packages that depend on Microsoft.AspNetCore.Mvc.Testing:
| Package | Downloads |
|---|---|
|
Alba
Supercharged integration testing for ASP.NET Core HTTP endpoints |
|
|
Ardalis.HttpClientTestExtensions
Helpful extension methods to use when testing APIs in Functional Tests with xUnit. |
|
|
MELT.Serilog.AspNetCore
Helper for the MELT testing library to verify that the correct logs are generated by ASP.NET Core applications, when writing integration tests with Microsoft.AspNetCore.Mvc.Testing. |
|
|
FastEndpoints.Testing
Integration/End-To-End testing helper library for FastEndpoints |
|
|
Volo.Abp.AspNetCore.TestBase
Package Description |
Showing the top 20 popular GitHub repositories that depend on Microsoft.AspNetCore.Mvc.Testing:
| Repository | Stars |
|---|---|
|
jellyfin/jellyfin
The Free Software Media System - Server Backend & API
|
|
|
microsoft/semantic-kernel
Integrate cutting-edge LLM technology quickly and easily into your apps
|
|
|
jasontaylordev/CleanArchitecture
Clean Architecture Solution Template for ASP.NET Core
|
|
|
bitwarden/server
Bitwarden infrastructure/backend (API, database, Docker, etc).
|
|
|
ardalis/CleanArchitecture
Clean Architecture Solution Template: A proven Clean Architecture Template for ASP.NET Core 10
|
|
|
abpframework/abp
Open-source web application framework for ASP.NET Core! Offers an opinionated architecture to build enterprise software solutions with best practices on top of the .NET. Provides the fundamental infrastructure, cross-cutting-concern implementations, startup templates, application modules, UI themes, tooling and documentation.
|
|
|
dotnet/AspNetCore.Docs
Documentation for ASP.NET Core
|
|
|
aspnetboilerplate/aspnetboilerplate
ASP.NET Boilerplate - Web Application Framework
|
|
|
dotnet-architecture/eShopOnWeb
Sample ASP.NET Core 8.0 reference application, now community supported: https://github.com/NimblePros/eShopOnWeb
|
|
|
dotnet/eShop
A reference .NET application implementing an eCommerce site
|
|
|
dodyg/practical-aspnetcore
Practical samples of ASP.NET Core 11, 10, 9, 8.0, 7.0, 6.0, 5.0, 3.1, 2.2, and 2.1,projects you can use. Readme contains explanations on all projects.
|
|
|
dotnet/yarp
A toolkit for developing high-performance HTTP reverse proxy applications.
|
|
|
OrchardCMS/OrchardCore
Orchard Core is an open-source modular and multi-tenant application framework built with ASP.NET Core, and a content management system (CMS) built on top of that framework.
|
|
|
elsa-workflows/elsa-core
The Workflow Engine for .NET
|
|
|
quartznet/quartznet
Quartz Enterprise Scheduler .NET
|
|
|
fullstackhero/dotnet-starter-kit
Production Grade Cloud-Ready .NET 10 Starter Kit (Web API + React Client) with Multitenancy Support, and Clean/Modular Architecture that saves roughly 200+ Development Hours! All Batteries Included.
|
|
|
Azure/azure-sdk-for-net
This repository is for active development of the Azure SDK for .NET. For consumers of the SDK we recommend visiting our public developer docs at https://learn.microsoft.com/dotnet/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-net.
|
|
|
graphql-dotnet/graphql-dotnet
GraphQL for .NET
|
|
|
FastEndpoints/FastEndpoints
A light-weight REST API development framework for ASP.NET 8 and newer.
|
|
|
kurrent-io/KurrentDB
KurrentDB is a database that's engineered for modern software applications and event-driven architectures. Its event-native design simplifies data modeling and preserves data integrity while the integrated streaming engine solves distributed messaging challenges and ensures data consistency.
|
| Version | Downloads | Last Updated |
|---|---|---|
| 11.0.0-preview.5.26302.115 | 2,131 | 6/9/2026 |
| 11.0.0-preview.4.26230.115 | 6,756 | 5/12/2026 |
| 11.0.0-preview.3.26207.106 | 4,597 | 4/14/2026 |
| 11.0.0-preview.2.26159.112 | 4,528 | 3/10/2026 |
| 10.0.9 | 452,324 | 6/9/2026 |
| 10.0.8 | 2,635,502 | 5/12/2026 |
| 10.0.7 | 3,598,429 | 4/21/2026 |
| 10.0.6 | 1,026,768 | 4/14/2026 |
| 10.0.5 | 4,069,557 | 3/12/2026 |
| 10.0.4 | 471,274 | 3/10/2026 |
| 9.0.17 | 30,785 | 6/9/2026 |
| 9.0.16 | 139,921 | 5/12/2026 |
| 9.0.15 | 395,130 | 4/14/2026 |
| 9.0.14 | 493,157 | 3/10/2026 |
| 8.0.28 | 77,176 | 6/9/2026 |
| 8.0.27 | 356,190 | 5/12/2026 |
| 8.0.26 | 630,728 | 4/14/2026 |
| 8.0.25 | 890,226 | 3/10/2026 |
| 2.3.11 | 192 | 6/9/2026 |
| 2.3.10 | 1,616 | 5/12/2026 |