7 Testing microservices
This chapter covers
- Understanding the motivation behind testing
- Test strategies (e.g., unit testing, integration testing, and end-to-end testing)
- Test containers’ usage in test automation
- Calculating and viewing the test coverage for test suites
- Understanding test pyramids
Microservice architecture encourages you to write minimal services that can be easily tested as a unit. For example, while testing the Order service, the only context you need to focus on is Order. To test the Order service, you have two high-level alternatives: manual testing and automated testing.
With manual testing, you must run actual and dependent services to test the entire flow. This can be a time-consuming operation compared to testing backed ...
Get gRPC Microservices in Go now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.