Microsoft.AspNetCore.Mvc.Testing 10.0.0-rc.2.25502.107

Prefix Reserved
This is a prerelease version of Microsoft.AspNetCore.Mvc.Testing.
dotnet add package Microsoft.AspNetCore.Mvc.Testing --version 10.0.0-rc.2.25502.107
                    
NuGet\Install-Package Microsoft.AspNetCore.Mvc.Testing -Version 10.0.0-rc.2.25502.107
                    
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.Mvc.Testing" Version="10.0.0-rc.2.25502.107" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="10.0.0-rc.2.25502.107" />
                    
Directory.Packages.props
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Microsoft.AspNetCore.Mvc.Testing --version 10.0.0-rc.2.25502.107
                    
#r "nuget: Microsoft.AspNetCore.Mvc.Testing, 10.0.0-rc.2.25502.107"
                    
#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.
#:package Microsoft.AspNetCore.Mvc.Testing@10.0.0-rc.2.25502.107
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Microsoft.AspNetCore.Mvc.Testing&version=10.0.0-rc.2.25502.107&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Microsoft.AspNetCore.Mvc.Testing&version=10.0.0-rc.2.25502.107&prerelease
                    
Install as a Cake Tool

About

Microsoft.AspNetCore.Mvc.Testing provides support for writing integration tests for ASP.NET Core apps that utilize MVC or Minimal APIs.

Key Features

  • Copies the dependencies file (.deps.json) from the System Under Test (SUT) into the test project's bin directory
  • Sets the content root to the SUT's project root so that static files are found during test execution
  • Provides the WebApplicationFactory class to streamline bootstrapping the SUT with TestServer

How to Use

To use Microsoft.AspNetCore.Mvc.Testing, follow these steps:

Installation

To install the package, run the following command from the directory containing the test project file:

dotnet add package Microsoft.AspNetCore.Mvc.Testing

Configuration

To configure the test app, follow these steps:

  1. Specify the Web SDK in the test project file (<Project Sdk="Microsoft.NET.Sdk.Web">).
  2. Add references to the following packages:
    • xunit
    • xunit.runner.visualstudio
    • Microsoft.NET.Test.Sdk
  3. Add a test class to the test project:
    public 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());
        }
    }
    

Additional Documentation

For additional documentation and examples, refer to the official documentation on integration testing in ASP.NET Core.

Feedback & Contributing

Microsoft.AspNetCore.Mvc.Testing is released as open-source under the MIT license. Bug reports and contributions are welcome at the GitHub repository.

Product Compatible and additional computed target framework versions.
.NET 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (248)

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.

Reo.Core.IntegrationTesting

Package Description

Volo.Abp.AspNetCore.TestBase

Package Description

FastEndpoints.Testing

Integration/End-To-End testing helper library for FastEndpoints

GitHub repositories (307)

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
ardalis/CleanArchitecture
Clean Architecture Solution Template: A proven Clean Architecture Template for ASP.NET Core 9
bitwarden/server
Bitwarden infrastructure/backend (API, database, Docker, etc).
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
dodyg/practical-aspnetcore
Practical samples of ASP.NET Core 10 RC 1, 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/eShop
A reference .NET application implementing an eCommerce site
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
A .NET workflows library
quartznet/quartznet
Quartz Enterprise Scheduler .NET
graphql-dotnet/graphql-dotnet
GraphQL for .NET
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.
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.
FastEndpoints/FastEndpoints
A light-weight REST API development framework for ASP.NET 8 and newer.
domaindrivendev/Swashbuckle.AspNetCore
Swagger tools for documenting API's built on ASP.NET Core
jasontaylordev/NorthwindTraders
Northwind Traders is a sample application built using ASP.NET Core and Entity Framework Core.
umbraco/Umbraco-CMS
Umbraco is a free and open source .NET content management system helping you deliver delightful digital experiences.
Version Downloads Last Updated
10.0.0-rc.2.25502.107 3,729 10/14/2025
10.0.0-rc.1.25451.107 42,484 9/9/2025
10.0.0-preview.7.25380.108 24,284 8/12/2025
10.0.0-preview.6.25358.103 4,972 7/15/2025
10.0.0-preview.5.25277.114 7,759 6/6/2025
10.0.0-preview.4.25258.110 5,022 5/12/2025
10.0.0-preview.3.25172.1 3,452 4/10/2025
10.0.0-preview.2.25164.1 3,072 3/18/2025
10.0.0-preview.1.25120.3 96,843 2/25/2025
9.0.10 81,107 10/14/2025
9.0.9 1,044,971 9/9/2025
9.0.8 1,331,780 8/5/2025
9.0.7 1,023,921 7/8/2025
9.0.6 1,250,147 6/10/2025
9.0.5 1,327,561 5/13/2025
9.0.4 1,794,175 4/8/2025
9.0.3 1,514,671 3/11/2025
9.0.2 1,491,871 2/11/2025
9.0.1 1,515,086 1/14/2025
9.0.0 2,989,068 11/12/2024
9.0.0-rc.2.24474.3 51,139 10/8/2024
9.0.0-rc.1.24452.1 26,026 9/10/2024
9.0.0-preview.7.24406.2 8,770 8/13/2024
9.0.0-preview.6.24328.4 11,778 7/9/2024
9.0.0-preview.5.24306.11 4,052 6/11/2024
9.0.0-preview.4.24267.6 2,894 5/21/2024
9.0.0-preview.3.24172.13 70,694 4/11/2024
9.0.0-preview.2.24128.4 4,838 3/12/2024
9.0.0-preview.1.24081.5 26,111 2/13/2024
8.0.21 45,813 10/14/2025
8.0.20 566,204 9/9/2025
8.0.19 1,130,742 8/4/2025
8.0.18 666,895 7/8/2025
8.0.17 1,163,560 6/10/2025
8.0.16 1,064,223 5/13/2025
8.0.15 1,737,789 4/8/2025
8.0.14 1,825,509 3/11/2025
8.0.13 2,052,470 2/11/2025
8.0.12 1,959,478 1/14/2025
8.0.11 5,251,482 11/12/2024
8.0.10 7,053,623 10/8/2024
8.0.8 8,070,541 8/13/2024
8.0.7 5,796,026 7/9/2024
8.0.6 4,893,845 5/28/2024
8.0.5 2,264,870 5/14/2024
8.0.4 5,788,067 4/9/2024
8.0.3 3,670,422 3/12/2024
8.0.2 3,397,239 2/13/2024
8.0.1 3,797,658 1/9/2024
8.0.0 5,706,230 11/14/2023
8.0.0-rc.2.23480.2 58,322 10/10/2023
8.0.0-rc.1.23421.29 58,687 9/12/2023
8.0.0-preview.7.23375.9 10,956 8/8/2023
8.0.0-preview.6.23329.11 28,186 7/11/2023
8.0.0-preview.5.23302.2 12,921 6/13/2023
8.0.0-preview.4.23260.4 263,301 5/16/2023
8.0.0-preview.3.23177.8 3,711 4/11/2023
8.0.0-preview.2.23153.2 2,144 3/14/2023
8.0.0-preview.1.23112.2 41,084 2/21/2023
7.0.20 550,480 5/28/2024
7.0.19 85,103 5/14/2024
7.0.18 193,124 4/9/2024
7.0.17 396,084 3/12/2024
7.0.16 432,887 2/13/2024
7.0.15 572,629 1/9/2024
7.0.14 975,289 11/14/2023
7.0.13 2,194,627 10/24/2023
7.0.12 728,724 10/10/2023
7.0.11 3,291,052 9/12/2023
7.0.10 1,438,928 8/8/2023
7.0.9 1,251,621 7/11/2023
7.0.8 921,374 6/22/2023
7.0.7 496,143 6/13/2023
7.0.5 3,013,353 4/11/2023
7.0.4 1,663,462 3/14/2023
7.0.3 1,530,612 2/14/2023
7.0.2 1,514,836 1/10/2023
7.0.1 877,098 12/13/2022
7.0.0 2,918,181 11/7/2022
7.0.0-rc.2.22476.2 67,584 10/11/2022
7.0.0-rc.1.22427.2 22,685 9/14/2022
7.0.0-preview.7.22376.6 7,867 8/9/2022
7.0.0-preview.6.22330.3 2,585 7/12/2022
7.0.0-preview.5.22303.8 9,493 6/14/2022
7.0.0-preview.4.22251.1 2,257 5/10/2022
7.0.0-preview.3.22178.4 1,345 4/13/2022
7.0.0-preview.2.22153.2 1,112 3/14/2022
7.0.0-preview.1.22109.13 5,195 2/17/2022
6.0.36 1,322,438 11/12/2024
6.0.35 233,189 10/8/2024
6.0.33 1,186,258 8/13/2024
6.0.32 316,398 7/9/2024
6.0.31 463,043 5/28/2024
6.0.30 160,258 5/14/2024
6.0.29 699,055 4/9/2024
6.0.28 422,939 3/12/2024
6.0.27 633,784 2/13/2024
6.0.26 905,767 1/9/2024
6.0.25 1,669,533 11/14/2023
6.0.24 838,449 10/24/2023
6.0.23 602,785 10/10/2023
6.0.22 975,489 9/12/2023
6.0.21 1,351,884 8/8/2023
6.0.20 1,257,677 7/11/2023
6.0.19 751,989 6/22/2023
6.0.18 500,307 6/13/2023
6.0.16 2,556,555 4/11/2023
6.0.15 1,423,110 3/14/2023
6.0.14 1,780,349 2/14/2023
6.0.13 2,298,014 1/10/2023
6.0.12 2,506,662 12/13/2022
6.0.11 2,825,920 11/7/2022
6.0.10 4,294,931 10/11/2022
6.0.9 3,257,101 9/13/2022
6.0.8 4,197,699 8/9/2022
6.0.7 3,509,245 7/12/2022
6.0.6 2,601,140 6/14/2022
6.0.5 3,204,155 5/10/2022
6.0.4 2,984,159 4/11/2022
6.0.3 3,174,040 3/8/2022
6.0.2 3,097,262 2/8/2022
6.0.1 4,473,428 12/14/2021
6.0.0 5,205,475 11/8/2021
6.0.0-rc.2.21480.10 205,991 10/12/2021
6.0.0-rc.1.21452.15 173,508 9/14/2021
6.0.0-preview.7.21378.6 7,452 8/10/2021
6.0.0-preview.6.21355.2 4,531 7/14/2021
6.0.0-preview.5.21301.17 3,303 6/15/2021
6.0.0-preview.4.21253.5 6,683 5/24/2021
6.0.0-preview.3.21201.13 5,036 4/8/2021
6.0.0-preview.2.21154.6 1,015 3/11/2021 6.0.0-preview.2.21154.6 is deprecated because it is no longer maintained.
6.0.0-preview.1.21103.6 1,101 2/12/2021 6.0.0-preview.1.21103.6 is deprecated because it is no longer maintained.
5.0.17 726,401 5/10/2022 5.0.17 is deprecated because it is no longer maintained.
5.0.16 112,395 4/11/2022 5.0.16 is deprecated because it is no longer maintained.
5.0.15 217,490 3/8/2022 5.0.15 is deprecated because it is no longer maintained.
5.0.14 214,893 2/8/2022 5.0.14 is deprecated because it is no longer maintained.
5.0.13 507,982 12/14/2021 5.0.13 is deprecated because it is no longer maintained.
5.0.12 614,595 11/7/2021 5.0.12 is deprecated because it is no longer maintained.
5.0.11 1,055,644 10/12/2021 5.0.11 is deprecated because it is no longer maintained.
5.0.10 1,072,859 9/14/2021 5.0.10 is deprecated because it is no longer maintained.
5.0.9 1,192,708 8/10/2021 5.0.9 is deprecated because it is no longer maintained.
5.0.8 935,560 7/13/2021 5.0.8 is deprecated because it is no longer maintained.
5.0.7 1,211,853 6/8/2021 5.0.7 is deprecated because it is no longer maintained.
5.0.6 956,335 5/11/2021 5.0.6 is deprecated because it is no longer maintained.
5.0.5 1,394,876 4/6/2021 5.0.5 is deprecated because it is no longer maintained.
5.0.4 836,938 3/9/2021 5.0.4 is deprecated because it is no longer maintained.
5.0.3 1,000,233 2/9/2021 5.0.3 is deprecated because it is no longer maintained.
5.0.2 947,776 1/12/2021 5.0.2 is deprecated because it is no longer maintained.
5.0.1 590,128 12/8/2020 5.0.1 is deprecated because it is no longer maintained.
5.0.0 1,746,678 11/9/2020 5.0.0 is deprecated because it is no longer maintained.
5.0.0-rc.2.20475.17 15,168 10/13/2020 5.0.0-rc.2.20475.17 is deprecated because it is no longer maintained.
5.0.0-rc.1.20451.17 9,239 9/14/2020 5.0.0-rc.1.20451.17 is deprecated because it is no longer maintained.
5.0.0-preview.8.20414.8 9,313 8/25/2020 5.0.0-preview.8.20414.8 is deprecated because it is no longer maintained.
5.0.0-preview.7.20365.19 3,855 7/21/2020 5.0.0-preview.7.20365.19 is deprecated because it is no longer maintained.
5.0.0-preview.6.20312.15 2,206 6/25/2020 5.0.0-preview.6.20312.15 is deprecated because it is no longer maintained.
5.0.0-preview.5.20279.2 1,035 6/10/2020 5.0.0-preview.5.20279.2 is deprecated because it is no longer maintained.
5.0.0-preview.4.20257.10 1,660 5/18/2020 5.0.0-preview.4.20257.10 is deprecated because it is no longer maintained.
5.0.0-preview.3.20215.14 2,143 4/23/2020 5.0.0-preview.3.20215.14 is deprecated because it is no longer maintained.
5.0.0-preview.2.20167.3 1,026 4/2/2020 5.0.0-preview.2.20167.3 is deprecated because it is no longer maintained.
5.0.0-preview.1.20124.5 1,278 3/16/2020 5.0.0-preview.1.20124.5 is deprecated because it is no longer maintained.
3.1.32 501,275 12/13/2022
3.1.31 101,101 11/8/2022
3.1.30 790,077 10/11/2022
3.1.29 75,198 9/13/2022
3.1.28 120,906 8/9/2022
3.1.27 111,573 7/12/2022
3.1.26 126,992 6/14/2022
3.1.25 143,463 5/10/2022
3.1.24 144,960 4/11/2022
3.1.23 209,182 3/8/2022
3.1.22 615,250 12/14/2021
3.1.21 446,085 11/7/2021
3.1.20 406,517 10/11/2021
3.1.19 276,187 9/14/2021
3.1.18 811,449 8/10/2021
3.1.17 574,374 7/13/2021
3.1.16 500,654 6/8/2021
3.1.15 447,281 5/11/2021
3.1.14 785,199 4/6/2021
3.1.13 919,996 3/9/2021
3.1.12 557,433 2/9/2021
3.1.11 715,117 1/12/2021
3.1.10 2,177,319 11/9/2020
3.1.9 2,351,007 10/13/2020
3.1.8 2,054,430 9/8/2020
3.1.7 1,600,012 8/11/2020
3.1.6 1,794,989 7/14/2020
3.1.5 2,174,047 6/9/2020
3.1.4 1,523,308 5/12/2020
3.1.3 2,448,379 3/24/2020
3.1.2 2,022,862 2/18/2020
3.1.1 1,810,463 1/14/2020
3.1.0 2,170,404 12/3/2019
3.1.0-preview3.19555.2 2,453 11/13/2019 3.1.0-preview3.19555.2 is deprecated because it is no longer maintained.
3.1.0-preview2.19528.8 1,210 11/1/2019 3.1.0-preview2.19528.8 is deprecated because it is no longer maintained.
3.1.0-preview1.19508.20 1,695 10/15/2019 3.1.0-preview1.19508.20 is deprecated because it is no longer maintained.
3.0.3 110,798 2/18/2020 3.0.3 is deprecated because it is no longer maintained.
3.0.2 59,382 1/14/2020 3.0.2 is deprecated because it is no longer maintained.
3.0.0 2,989,126 9/23/2019 3.0.0 is deprecated because it is no longer maintained.
3.0.0-rc1.19457.4 10,774 9/16/2019 3.0.0-rc1.19457.4 is deprecated because it is no longer maintained.
3.0.0-preview9.19424.4 5,255 9/4/2019 3.0.0-preview9.19424.4 is deprecated because it is no longer maintained.
3.0.0-preview8.19405.7 16,764 8/13/2019 3.0.0-preview8.19405.7 is deprecated because it is no longer maintained.
3.0.0-preview7.19365.7 5,996 7/23/2019 3.0.0-preview7.19365.7 is deprecated because it is no longer maintained.
3.0.0-preview6.19307.2 4,773 6/12/2019 3.0.0-preview6.19307.2 is deprecated because it is no longer maintained.
3.0.0-preview5-19227-01 17,867 5/6/2019 3.0.0-preview5-19227-01 is deprecated because it is no longer maintained.
3.0.0-preview4-19216-03 2,192 4/18/2019 3.0.0-preview4-19216-03 is deprecated because it is no longer maintained.
3.0.0-preview3-19153-02 1,657 3/6/2019 3.0.0-preview3-19153-02 is deprecated because it is no longer maintained.
3.0.0-preview-19075-0444 3,906 1/29/2019 3.0.0-preview-19075-0444 is deprecated because it is no longer maintained.
3.0.0-preview-18579-0056 3,344 12/3/2018 3.0.0-preview-18579-0056 is deprecated because it is no longer maintained.
2.3.0 31,445 1/14/2025
2.2.0 6,802,514 12/3/2018 2.2.0 is deprecated because it is no longer maintained.
2.2.0-preview3-35497 16,317 10/17/2018 2.2.0-preview3-35497 is deprecated because it is no longer maintained.
2.2.0-preview2-35157 4,469 9/12/2018 2.2.0-preview2-35157 is deprecated because it is no longer maintained.
2.2.0-preview1-35029 7,550 8/22/2018 2.2.0-preview1-35029 is deprecated because it is no longer maintained.
2.1.3 1,505,225 10/1/2018
2.1.2 366,616 8/21/2018
2.1.1 1,005,443 6/18/2018
2.1.0 904,900 5/29/2018
2.1.0-rc1-final 21,186 5/6/2018 2.1.0-rc1-final is deprecated because it is no longer maintained.
2.1.0-preview2-final 5,223 4/10/2018 2.1.0-preview2-final is deprecated because it is no longer maintained.
2.1.0-preview1-final 4,147 2/26/2018 2.1.0-preview1-final is deprecated because it is no longer maintained.