Join our book community on Discord
https://packt.link/EarlyAccess/
This chapter is about testing your web services. Unit tests are good at detecting errors in business logic in a class or method, but you also need to verify that larger parts of your codebase work together with each other and external systems. This is where integration testing becomes important for web services.
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.
One tool available at the command line and in Visual Studio that makes it easier to perform integration tests on web services is dev tunnels. We will see how to use them to simplify testing services. Dev...