Integration and Security Testing
This chapter is about integration and security testing, both high-level types of testing. Unit tests are good at detecting errors in business logic, but you also need to verify that all the parts of your codebase work together with each other and external systems. This is where integration testing becomes important.
Some external systems should be used directly in integration tests, and some should be replaced with a test double. Integration tests commonly call out-of-process systems like databases, event buses, and message queues. This makes integration tests slower than unit tests, but integration tests cover more code, both in your codebase and external libraries. Integration tests are more likely to catch regressions.
To learn about a real-world example regression in a .NET logging package, you can read a GitHub issue at the following link: https://github.com/markjprice/cs11dotnet7/blob/main/docs/errata/errata.md#page-178---reviewing...