1

Each microservice is tested and deployed independently from other microservices. To guarantee the compatibility of API the Consumer-Driven Contracts approach is used. But how is the compatibility of business logic tested in microservices (independetly from other microservices)?

1 Answer 1

3

By the book, microservices business logic are independent from each other - built around business capabilities. This is achieved by defining bounded contexts (check it here, here, and here).

enter image description here

It means that your testing shouldn't involve the business logic of the downstream services - this would mean that you are breaking the bounded contexts and becoming fragile on things that are not under your control.

You can take the same approach as you take for third-party services: E.g., mocking for testing pre-production and monitoring for testing in production.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.