So far, we've written some microservice implementations (Chapter 4, Beginning Your Microservice Journey); set up a single point of contact, API Gateway (Chapter 5, Understanding API Gateway); added a registry where each service can log their status (Chapter 6, Service Registry and Discovery); set up collaboration between microservices (Chapter 7, Service State and Interservice Communication); and written some implementations of them. The implementations seem fine from a developer's point of view, but these days nothing is accepted without testing. This is the age of behavior-driven development and test-driven development. As we write more and more microservices, developing systems without automated test cases and documentation becomes unmanageable and painful.
This chapter will start with understanding the testing pyramid, with an in-depth description of all the different kinds of tests involved in microservices. We will understand the testing...