End-to-end integration testing with .NET Aspire

preview_player
Показать описание
.NET Aspire is great for building distributed applications, defining all the resources, how they reference each other, and starting all the containers and projects. But integration testing can still be tricky as you need that whole environment setup as well. Don't worry, .NET Aspire is here to help, let's take a look at how to use the testing features it provides.

Chapters:
00:00 - Intro
01:00 - App walkthrough & identify integration test opportunities
02:24 - Creating a .NET Aspire test project
03:30 - Writing the web frontend test
07:25 - Running the frontend test
08:00 - Writing and running the backend test
11:00 - Wrap-up

Resources:

Connect with .NET:

#dotnet #dotnetaspire
Рекомендации по теме
Комментарии
Автор

Can Aspire Testing help to spin up temporary infrastructure like databases, use these for tests then throw them away after (similar to what Test Containers does)?

dandoescode
Автор

Good video, but I think it should come with a fixture to build the aspire apphost, since this would be a must have for every project. In it's current state it gives margin for a lot of issues when trying to create your own fixture (lack of padronization, isn't this the problem that the template is trying to solve?)

lucasi-cs
Автор

I don't think it's very useful in the current state because there is no way to replace services for testing. For example provide mock for a single service within API project and then verify what has been called with what parameters. It currently only allows out of process communication testing AFAIK.

join shbcf.ru