Testing

Service dependencies can complicate testing and generally require a more formal effort describing the service communication interfaces.

It can be difficult to recreate environments in a consistent way when you have multiple services evolving at a different rate. Whatever we deploy in to a staging environment will not exactly reflect what’s in production. Setting up that many instances for the staging environment may not be worth the return. We can perform integration tests using mocks, service stubs, and consumer-driven contracts. A tool called Pact can be useful (https://github.com/realestate-com-au/pact).

A release should not end with the deployment of the service update. Testing in production is generally the way to go, and by placing ...

Get Microservices with Docker on Microsoft Azure™ (includes Content Update Program) 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.