Тёмный

.NET API Integration Testing using an In-Memory Database! 

Israel Quiroz
Подписаться 3,6 тыс.
Просмотров 1,4 тыс.
50% 1

Integration testing is when you want to test a system not just a piece of code like you would in a unit test. For these tests its common to customize the dependencies you want to use so that you do not use the regular dependencies of your project. This can be done by creating a custom web application factory. If you do not have a test database you can also take advantage of in-memory databases. In this video I will create the custom dependencies to use and take advantage of a sqlite in-memory database to perform integration testing on my .Net 8 API. If you want access to the repo from this video or have any other questions become a channel member down below!
Join this channel to get access to perks:
/ @israelquiroz
Support Me On Patreon: / israelquiroz
Follow Me On TikTok: www.tiktok.com/@israelquiroz9...
All My Links Here: linktr.ee/israelquiroz
Integration Testing Resources
--------------------------------------------------
learn.microsoft.com/en-us/asp...
timdeschryver.dev/blog/how-to...
#IntegrationTesting #DotNet8 #DotNetAPITesting
Timestamps
---------------------------
00:00 Intro
00:37 What is Integration Testing?
02:46 Intro to the API we are testing
03:46 Creating the Integration Testing Project & Setup
05:23 Nuget Packages Needed
06:12 Setting up Your Integration Tests and change in Program.cs file
10:39 Setting up our CustomWebApplicationFactory with In-Memory DB
13:08 Setting up how to Seed our DB
15:06 Creating our Integration Tests for our endpoints!
18:53 Running Our Integration Tests

Наука

Опубликовано:

 

27 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 5   
@IsraelQuiroz
@IsraelQuiroz 5 месяцев назад
Hope you guys enjoyed it! Like i said Integration Tests can be done in many different ways if you guys have any tips for making mine better as well im always open to them! Appreciate the support don't forget to like the video! If you want access to the repo from this video or have any other questions become a channel member by clicking the link in the description!
@loveabledaughters514
@loveabledaughters514 2 месяца назад
Great learning Thank you. Currently am trying to create an integration testing with the same way with sql lite , but my main solution is a console application and doesn't have any controller am calling the main function in the Program.cs file itself . the main method calls pulls data from sql data using EF and based on that data am calling an external web service to get employee details and sending an email . do you have any sample to create a in memory cache with sql lite for a console application .
@chrislabelle7113
@chrislabelle7113 5 месяцев назад
Great video thanks for sharing. I've been trying to set up something like this for a while and it appears there aren't that many resources out there covering integration tests with an in memory database for .NET apis.
@IsraelQuiroz
@IsraelQuiroz 5 месяцев назад
Thank you!!!! i truly appreciate it and im happy it was exactly what u needed!
Далее
ASP.NET Core Integration Testing Tutorial
24:35
Просмотров 18 тыс.
БАТЯ И ТЁЩА😂#shorts
00:58
Просмотров 3,4 млн
Domain Driven Design - Entities in 2 Minutes
2:10
Просмотров 4,4 тыс.
MassTransit Testing with Web Application Factory
8:30
Samsung laughing on iPhone #techbyakram
0:12
Просмотров 4 млн