All Projects → martincostello → dotnet-minimal-api-integration-testing

martincostello / dotnet-minimal-api-integration-testing

Licence: Apache-2.0 license
An example of integration testing ASP.NET Core Minimal hosting and APIs

Programming Languages

C#
18002 projects
typescript
32286 projects
HTML
75241 projects
powershell
5483 projects
javascript
184084 projects - #8 most used programming language
Batchfile
5799 projects

Projects that are alternatives of or similar to dotnet-minimal-api-integration-testing

Identityserver
An open-source, standards-compliant, and flexible OpenID Connect and OAuth 2.x framework for ASP.NET Core
Stars: ✭ 223 (-5.91%)
Mutual labels:  aspnetcore
Aspnetcore Vueclimiddleware
Helpers for building single-page applications on ASP.NET MVC Core using Vue Cli or Quasar Cli.
Stars: ✭ 253 (+6.75%)
Mutual labels:  aspnetcore
RabbitLight
A simple route-based RabbitMQ client for .NET
Stars: ✭ 11 (-95.36%)
Mutual labels:  aspnetcore
Identity.dapper
Identity package that uses Dapper instead EntityFramework for use with .NET Core
Stars: ✭ 234 (-1.27%)
Mutual labels:  aspnetcore
Blazortable
Blazor Table Component with Sorting, Paging and Filtering
Stars: ✭ 249 (+5.06%)
Mutual labels:  aspnetcore
SharpPlugs
.Net Core 鋒利扩展
Stars: ✭ 26 (-89.03%)
Mutual labels:  aspnetcore
Run Aspnetcore
A starter kit for your next ASP.NET Core web application. Boilerplate for ASP.NET Core reference application, demonstrating a layered application architecture with applying Clean Architecture and DDD best practices. Download 100+ page eBook PDF from here ->
Stars: ✭ 227 (-4.22%)
Mutual labels:  aspnetcore
AspNetCore6Experiments
ASP.NET Core Blazor BFF with Azure AD and Razor page
Stars: ✭ 43 (-81.86%)
Mutual labels:  aspnetcore
Devarchitecture
DevArchitecture Backend Project
Stars: ✭ 243 (+2.53%)
Mutual labels:  aspnetcore
aspnetcore-service-fabric-hosting
This project is an extensions to ASP.NET Generic Host (HostBuilder) that simplifies development of Service Fabric Reliable Services.
Stars: ✭ 24 (-89.87%)
Mutual labels:  aspnetcore
Aspnetcore.proxy
ASP.NET Core Proxies made easy.
Stars: ✭ 234 (-1.27%)
Mutual labels:  aspnetcore
Netcorekit
💗 A crafted toolkit for building cloud-native apps on the .NET platform
Stars: ✭ 248 (+4.64%)
Mutual labels:  aspnetcore
https-aspnetcore-in-docker
ASP.NET Core app on HTTPS in Docker
Stars: ✭ 24 (-89.87%)
Mutual labels:  aspnetcore
Efcoresecondlevelcacheinterceptor
EF Core Second Level Cache Interceptor
Stars: ✭ 227 (-4.22%)
Mutual labels:  aspnetcore
ASP.NET-Core-2.0-GraphQL-Sample
GraphQL sample project in ASP.NET Core 2.0
Stars: ✭ 26 (-89.03%)
Mutual labels:  aspnetcore
Idunno.authentication
A filled with self-loathing implementation of Basic Authentication, and Certificate Authentication to make me feel like a real security person, all for for ASP.NET Core
Stars: ✭ 228 (-3.8%)
Mutual labels:  aspnetcore
SeoTags
SeoTags create all SEO tags you need such as meta, link, twitter card (twitter:), open graph (og:), and JSON-LD schema (structred data).
Stars: ✭ 113 (-52.32%)
Mutual labels:  aspnetcore
NHibernate.AspNetCore.Identity
ASP.NET Core Identity Provider for NHibernate
Stars: ✭ 54 (-77.22%)
Mutual labels:  aspnetcore
POS---Point-Of-Sales
Point of sales proof of concept developed using Asp.Net Core 2.2. Features: Customer, Vendor, Product, Purchase Order, Goods Receive, Sales Order, Inventory Transactions and POS form.
Stars: ✭ 120 (-49.37%)
Mutual labels:  aspnetcore
minimal-api-example
Original blog post: https://nikiforovall.github.io/dotnet/aspnetcore/2021/09/10/opinionated-minimal-api.html
Stars: ✭ 39 (-83.54%)
Mutual labels:  aspnetcore

Integration Testing ASP.NET Core Minimal APIs

Build status

Introduction

This sample project demonstrates techniques you can use for integration testing an ASP.NET Core web application that uses the minimal APIs feature.

The system-under-test used by the sample implements a simple Todo list application with ASP.NET Core using the following technologies:

The tests show how you can write integration tests for the API and User Interface layers of an application that can help you get good coverage of the system-under-test, as well as help give you confidence that the changes you make to an application are ready to ship to a production system.

The tests include demonstrations of the use of the following open source libraries and technologies:

Debugging

To debug the application locally outside of the integration tests, you will need to create a GitHub OAuth app to obtain secrets for the GitHub:ClientId and GitHub:ClientSecret options so that the OAuth user authentication works and you can log into the Todo App UI.

💡 When creating the GitHub OAuth app, use https://localhost:5001/sign-in-github as the Authorization callback URL.

⚠️ Do not commit GitHub OAuth secrets to source control. Configure them with User Secrets instead.

Building and Testing

Compiling the application yourself requires Git and the .NET SDK to be installed (version 7.0.100 or later).

To build and test the application locally from a terminal/command-line, run the following set of commands:

git clone https://github.com/martincostello/dotnet-minimal-api-integration-testing.git
cd dotnet-minimal-api-integration-testing
./build.ps1

Feedback

Any feedback or issues can be added to the issues for this project in GitHub.

Acknowledgements

Thanks to David Fowler (@davidfowl) from the ASP.NET Core team for helping out with resolving issues with Minimal Actions found from testing this sample with the ASP.NET Core 6 pre-releases!

Repository

The repository is hosted in GitHub: https://github.com/martincostello/dotnet-minimal-api-integration-testing.git

License

This project is licensed under the Apache 2.0 license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].