Service testing challenges
The customer we’ve been thinking about throughout this book has been a microservices developer writing services in C++ who wants to better understand TDD to improve the development process and increase the code quality. TDD is for anybody writing code. But in order to follow TDD, you need to have a clear idea of who your customer is so that you can write tests from that customer’s viewpoint.
There are different challenges involved when testing services as compared to testing an application that does everything itself. An application that includes everything is often called a monolithic application. Some examples of challenges that apply to services are these:
- Is the service reachable?
- Is the service running?
- Is the service overloaded with other requests?
- Are there any permissions or security checks that could affect your ability to call a service?
Before we get too far though, we need to understand what a service...