Integration Testing ASP.NET Core 3 Applications: Best Practices
Let's learn about building well-tested ASP.NET Core applications! This course will teach you how to design and develop integration tests that prevent regressions and improve application security and quality.
What you'll learn
This course will help you build higher quality web applications. In this course, Integration Testing ASP.NET Core Applications: Best Practices, you’ll learn how to write integration tests for your ASP.NET Core applications which are run using an in-memory test server.
First, you’ll explore the creation of integration test projects for your applications. Next, you’ll discover how to design unit tests which exercise web API projects. Finally, you’ll learn how to test ASP.NET Core UI applications and tackle advanced scenarios such as replacing services with mocks.
When you’re finished with this course, you’ll have the skills and knowledge to apply integration testing to ASP.NET Core applications, needed to rapidly develop robust, high-quality software.
Table of contents
- Module Introduction 1m
- Creating a Custom WebApplicationFactory 7m
- Testing Model Binding and Input Validation for POST Requests 7m
- Testing Multiple Conditions Using xUnit Theories 5m
- Testing Responses for POST Requests 2m
- Testing Success Responses 2m
- Testing Side-Effects 3m
- Testing Middleware 5m
- Testing Exceptions 3m
- Module Summary 1m
- Module Introduction 1m
- Configuring Redirects to Test Authentication 5m
- Testing Authorization Requirements 8m
- Configuring Entity Framework for In-memory Testing 7m
- Testing Pages and Controllers Which Require Entity Framework 3m
- Seeding and Resetting the Database within Tests 5m
- Refactoring Test Code for Reusability 5m
- Avoiding Brittle Tests 3m
- Testing POST Requests by Handling Antiforgery Tokens 9m
- Module Summary 1m