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: https://www.tiktok.com/@israelquiroz9...
All My Links Here: https://linktr.ee/israelquiroz
Integration Testing Resources
--------------------------------------------------
https://learn.microsoft.com/en-us/asp...
https://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
Watch video .NET API Integration Testing using an In-Memory Database! online without registration, duration hours minute second in high quality. This video was added by user Israel Quiroz 07 February 2024, don't forget to share it with your friends and acquaintances, it has been viewed on our site 2,075 once and liked it 49 people.