30% OFF - Use code HANDSON30 for 30% off any course or Dometrain Pro! Browse courses →
  • Courses
  • Learning Paths
  • Blogs
  • Authors
  • Leaderboard
  • Dometrain Pro
  • Shopping Basket

    Your basket is empty

  • Business Portal
  • From Zero to Hero: Integration testing in ASP.NET Core

    Learn integration testing in ASP.NET Core with real-world examples. Ensure your services are reliable and behave as expected using modern techniques.

    About This Course

    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 15m 8 sections
    Welcome
    01:35 Free preview
    What will you learn in this course?
    02:51 Free preview
    Who is the course for and prerequisites
    01:37 Free 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
    02:15
    What we need to do to test the UI
    01:41
    Introducing Playwright
    04:12
    How our Docker strategy changes
    06:37
    Bootstraping the test project
    07:11
    Testing: Create a resource
    14:33
    Testing: Get a resource
    06:37
    Your turn to practice
    00:48
    Testing: Getting all the resources
    03:07
    Testing: Update a resource
    05:57
    Testing: Delete a resource
    03:46
    Section recap
    00:41
    Course conclusion
    00:28

    Meet Your Instructor

    Nick Chapsas

    Nick Chapsas

    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.

    View all courses by Nick Chapsas

    What's New

    Getting Started: Model Context Protocol (MCP)
    course

    Getting Started: Model Context Protocol (MCP)

    Learn how to get started with the Model Context Protocol (MCP) and integrate it into your applications.

    Learn more about Getting Started: Model Context Protocol (MCP)
    Hands-On: Learn TypeScript
    course

    Hands-On: Learn TypeScript

    Learn TypeScript through hands-on coding exercises. Practice what you learn with interactive challenges designed for every level.

    Learn more about Hands-On: Learn TypeScript
    Hands-On: Learn JavaScript
    course

    Hands-On: Learn JavaScript

    Learn JavaScript through hands-on coding exercises. Practice what you learn with interactive challenges designed for every level.

    Learn more about Hands-On: Learn JavaScript
    Hands-On: Data Structures & Algorithms in C#
    course

    Hands-On: Data Structures & Algorithms in C#

    Master data structures and algorithms through hands-on coding exercises in C#. Free to enroll for 7 days!

    Learn more about Hands-On: Data Structures & Algorithms in C#
    Blogsmith.ai
    feature

    Blogsmith.ai

    Turn your videos into blogs and newsletters with AI. Check out our new product at blogsmith.ai.

    Learn more about Blogsmith.ai
    Leaderboard
    feature

    Leaderboard

    See how you stack up against other learners. Track your progress, climb the ranks, and compete with the Dometrain community.

    Learn more about Leaderboard
    Hands-On: Learn PostgreSQL
    course

    Hands-On: Learn PostgreSQL

    Learn PostgreSQL through hands-on coding exercises. Practice what you learn with interactive challenges designed for every level.

    Learn more about Hands-On: Learn PostgreSQL
    Free Hands-On: C# for Beginners
    course

    Free Hands-On: C# for Beginners

    Learn C# through hands-on coding exercises. Practice what you learn with interactive challenges designed for everyone, from beginners to experts.

    Learn more about Free Hands-On: C# for Beginners
    Getting Started: AI for .NET Developers
    course

    Getting Started: AI for .NET Developers

    Get started with integrating AI into your .NET applications effectively using the latest LLM best practices.

    Learn more about Getting Started: AI for .NET Developers
    Getting Started: Building .NET Applications on AWS
    course

    Getting Started: Building .NET Applications on AWS

    Learn how to build and deploy .NET applications on AWS using CDK, Lambda, DynamoDB, S3, and more.

    Learn more about Getting Started: Building .NET Applications on AWS
    What's new in C# 14
    blog

    What's new in C# 14

    This guide covers every new C# 14 feature, explains its benefits, and provides practical code examples to help you navigate how you can use them.

    Learn more about What's new in C# 14
    Let's Build It: AI Chatbot with RAG in .NET Using Your Data
    course

    Let's Build It: AI Chatbot with RAG in .NET Using Your Data

    Build a Retrieval-Augmented Generation (RAG) chatbot that can answer questions using your data.

    Learn more about Let's Build It: AI Chatbot with RAG in .NET Using Your Data
    From Zero to Hero: SignalR in .NET
    course

    From Zero to Hero: SignalR in .NET

    Enable enterprise-grade real-time communication for your web apps with SignalR.

    Learn more about From Zero to Hero: SignalR in .NET
    Deep Dive: Solution Architecture
    course

    Deep Dive: Solution Architecture

    Master solution architecture and turn business needs into scalable, maintainable systems.

    Learn more about Deep Dive: Solution Architecture
    Migrating: ASP.NET Web APIs to ASP.NET Core
    course

    Migrating: ASP.NET Web APIs to ASP.NET Core

    A step-by-step process to migrate ASP.NET Web APIs from .NET Framework to ASP.NET Core.

    Learn more about Migrating: ASP.NET Web APIs to ASP.NET Core
    Getting Started: Caching in .NET
    course

    Getting Started: Caching in .NET

    Let's make the hardest thing in programming easy for .NET software engineers.

    Learn more about Getting Started: Caching in .NET
    From Zero to Hero: Testing with xUnit in C#
    course

    From Zero to Hero: Testing with xUnit in C#

    Learn how to test any codebase in .NET with the latest version of xUnit, the industry-standard testing library.

    Learn more about From Zero to Hero: Testing with xUnit in C#
    Create a ChatGPT Console AI Chatbot in C#
    blog

    Create a ChatGPT Console AI Chatbot in C#

    This walkthrough is your hands-on entry point to create a basic C# console application that talks to ChatGPT using the OpenAI API.

    Learn more about Create a ChatGPT Console AI Chatbot in C#