Microservices applications rely on complex interactions among services. Engineering teams must create API tests with API mocks to shift testing left. Current approaches to mock creation are manual, which is expensive and inefficient.
We illustrate how Istio can be leveraged to significantly reduce engineering effort necessary for API testing.
API tests can be built using the following Istio capabilities:
- Dynamic deployment of Envoy filters to capture relevant examples of API requests and responses.
- Observability to trace request execution flows across all microservices.
- Virtual services can switch traffic between live services and mocks with no code changes.
- Ad hoc service testing locally leveraging API data to mock producer services
- Create service tests with auto-created API mocks, eliminating costly manual API mock creation
- Get visibility into failed API requests from end-to-end tests with no additional effort