Min API unit and integration testing (#27116)

* Min API unit and integration testing

* Min API unit and integration testing
pull/27162/head
Rick Anderson 2022-09-30 17:26:14 -10:00 committed by GitHub
parent fbf0a3857c
commit 9e25b2b5ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,23 @@
---
title: Test Minimal API apps
author: rick-anderson
description: Unit and integration tests in Minimal API apps
ms.author: riande
ms.date: 9/30/2022
monikerRange: '>= aspnetcore-7.0'
uid: fundamentals/minimal-apis/test-min-api
---
# Unit and integration tests in Minimal API apps
By [Fiyaz Bin Hasan](https://github.com/fiyazbinhasan), and [Rick Anderson](https://twitter.com/RickAndMSFT)
[!INCLUDE[](~/includes/integrationTests.md)]
The [sample code on GitHub](https://github.com/dotnet/AspNetCore.Docs.Samples/tree/main/fundamentals/minimal-apis/samples/MinApiTestsSample) provides an example of unit and integration tests on a Minimal API app.
## Additional Resources
* [Basic authentication tests](https://github.com/blowdart/idunno.Authentication/tree/dev/test/idunno.Authentication.Basic.Test) is not a .NET repository but was written by a member of the .NET team. It provides examples of basic authentication testing.
* [View or download sample code](https://github.com/dotnet/AspNetCore.Docs.Samples/tree/main/fundamentals/minimal-apis/samples/MinApiTestsSample)
* <xref:mvc/controllers/testing>
* <xref:test/razor-pages-tests>