Integration testing
A microservice needs to interact with other microservices, so testing these interactions is vital but presents some challenges. With integration testing, the primary challenge is that we need to test-run the instances of all the involved services (for instance, when testing a Web API that interacts with a database). This creates the need for complex setup and maintenance of these tests. In the next section, we will explore strategies to address these challenges.
Strategy
Testing interactions between microservices is vital. Integration testing of microservices presents some challenges. We will explore some strategies you can employ. We need to test things such as gateways and the consumption of RESTful API endpoints and domain event messaging being properly consumed and whether the data and the state produced by these services are properly persisted into a database. Unlike end-to-end testing, we do not need all the services to be running; we just focus on...