Microservices APIs require test strategies beyond end-to-end testing to fully realize the promise of velocity improvements. Service tests enable rapid iteration of services independently leveraging contracts between the services.
Mesh Dynamics automates creation of service tests for microservices APIs from requests used during developer testing.
Service tests using requests from API development
Mesh Dynamics utilizes API observability data captured during API development to generate both service tests as well as the API consumer contract tests. The requests to the upstream services are captured by routing the requests from the IDE to the API Studio proxy, and then forwarding the requests to the dev cluster.
Create service tests with requests during developer testing of APIs to automatically
Auto-generate service mocks for isolation from upstream services
Run pre-submit service tests locally before submitting code
Run service tests in CI
Shift-left: Run service tests locally before submitting your code
Export local service tests to run in CI
Auto-generated accurate mocks
Context-sensitive mocks for testing edge cases and failure conditions
Consumer API contract tests
With Mesh Dynamics, you can verify the contracts for the consumers of your API using data from service tests. The contract tests are generated automatically by identifying the requests to your API from all the consumer services from their service tests, and extracting the contracts from actual requests and responses. By comparing these contracts with the latest service tests for your API, Mesh Dynamics can identify any deviations from the contracts with any consumers of your API.