10
Testing in ASP.NET Core (Part 2 – Integration Testing)
In Chapter 9, we learned how to write unit tests for a ASP.NET Core web API application. Unit tests are used to test code units in isolation. However, a code unit often depends on other components, such as the database, external services, and so on. To test the code thoroughly, we need to test the code units in the context of the application. In other words, we need to test how the code units interact with other parts of the application. This type of testing is called integration testing.
In this chapter, we will mainly focus on integration testing. We will cover the following topics:
- Writing integration tests
- Testing with authentication and authorization
- Understanding code coverage ...
Get Web API Development with ASP.NET Core 8 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.