Summary
In this chapter, we explained why it is worth automating software tests, and then we focused on the importance of unit tests. We also listed the various types of tests and their main features, focusing mainly on unit tests and functional tests. We analyzed the advantages of TDD, and how to use it in practice. With this knowledge, you should be able to produce software that is both reliable and easy to modify.
Then, this chapter analyzed when it is worth automating some or all functional tests and described how to automate them in ASP.NET Core applications.
Finally, we analyzed the main test tools available for .NET projects, focusing on the description of xUnit
, Moq
, Microsoft.AspNetCore.Mvc.Testing
, and AngleSharp
, and showed how to use them in practice, with the help of the book’s use case.