Automated testing

Writing tests is an important part of building any application. Testing your code helps you spot and avoid bugs, and makes it easier to refactor your code later without breaking functionality or introducing new problems.

In this chapter you’ll learn how to write both unit tests and integration tests that exercise your ASP.NET Core application. Unit tests are small tests that make sure a single method or a few lines of code are working properly. Integration tests (sometimes called functional tests) are larger tests that simulate real-world scenarios and exercise multiple layers or parts of your application.