End-to-end testing
Before we deploy our microservices into production, we need to have a high level of confidence that it will not cause an issue with other services or infrastructure. Although end-to-end testing has value, careful consideration must be given when employing this type of testing as it is difficult to do and costly in terms of time and resources.
We need to be confident that the microservice is behaving as expected. We need to write a test that verifies that the service in question is interacting with infrastructure services and other application and domain services. To successfully test all of these interactions, we need all the services and databases involved to be up and running in an appropriate environment.
End-to-end tests are slow and brittle and can be costly in terms of time and maintenance. End-to-end testing should be minimized and represents the smaller portion of our testing pyramid, as shown in Figure 9.1.
The best strategy for end-to-end testing...