Testing Component Interactions with Contract Tests
Explore contract testing to verify component interactions in event-driven systems. Understand consumer-driven contracts that isolate tests to specific API expectations, enabling reliable, independent verification. Learn how this approach supports decoupling and integration confidence between microservices.
We have chosen to create our application using the modular monolith pattern. Here, we have each module communicate with the others using either gRPC or by publishing messages into a message broker. These would be very common to see on any distributed application but would be rare or not used at all on a monolith or small application. What’s more common to see across all applications is the REST API we use. This demonstration application does not have any true UI, but we have the API to support one. This API represents a third form of communication in our application, which is between an API provider and the API consumer.
Refining integration testing with contracts
We could test these interactions using integration tests since the definition of ...