Integration testing has quickly become one of the most used and most
important types of testing for modern .NET and ASP.NET Core applications.
This is mainly due to how much value a single Integration test can add and
how easy it has become nowadays to write Integration Tests due to advancements
in tooling. In this course, Nick Chapsas will introduce you to the beautiful
world of modern integration testing and how you can ensure that your services
behave as expected.
Course Curriculum
4h 14m 8 sections
Welcome
01:35Free preview
What will you learn in this course?
02:51Free preview
Who is the course for and prerequisites
01:37Free preview
The types of testing
08:18
The testing pyramid
03:02
Why are integration tests so important?
02:19
Why should you write integration tests?
02:17
What is in scope for integration testing
03:07
The project we will be working with
06:40
The 5 core integration testing steps
02:59
Project separation
02:39
Why xUnit?
01:16
Writing your first integration test
04:51
Naming in integration tests
02:31
Arrange, Act, Assert
01:48
xUnit’s test execution model
03:27
Test setup
02:04
Test cleanup
01:53
Parameterizing tests
05:26
Ignoring tests
01:18
Section recap
00:46
What this section is about
00:31
Writing fluent assertions
03:19
Testing strings
02:58
Testing numbers
02:00
Testing dates
01:37
Testing objects
03:32
Testing enumerables
03:32
Testing methods that throw Exceptions
02:23
Testing for raised events
01:29
Testing private methods (members)
01:24
Testing internal methods (members)
03:01
Section recap
00:26
The problem with integration tests
01:14
Introducing the WebApplicationFactory
05:06
Testing status codes
01:58
Testing text responses
01:31
Testing JSON responses
01:34
Testing response headers
01:00
Creating realistic test data
05:39
Cleaning up the test data
02:31
Sharing a single application for multiple test classes
05:32
Section recap
00:37
The project we will be writing integration tests for
05:11
Creating the WebApplicationFactory
03:46
The problem with data store dependencies
01:19
Introducing Docker
04:05
Taking a look at docker compose files
02:49
Creating a test container for our database
08:04
The problem with third party API dependencies
01:45
Introducing WireMock
03:50
Creating a mocked API server with WireMock
05:57
Testing: Create a resource
14:39
Your turn to practice
01:06
Testing: Getting a resource
04:34
Testing: Getting all resources
05:05
Testing: Updating a resource
03:51
Testing: Deleting resource
01:25
Testing: API Dependency Is Unavailable
04:36
Dealing with requests requiring auth
02:12
Dealing with background services
01:36
Integration testing Minimal APIs
00:52
Dealing with Entity Framework
03:10
Section recap
01:06
The project we will be writing UI integration tests for
Nick Chapsas is a .NET & C# content creator, educator and a Microsoft MVP for Developer Technologies with years of experience in Software Engineering and Engineering Management.
He has worked for some of the biggest companies in the world, building systems that served millions of users and tens of thousands of requests per second.
Nick creates free content on YouTube and is the host of the Keep Coding Podcast.