From the course: Advanced Spring: Effective Integration Testing with Spring Boot

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Introduction to Spring Cloud Contract

Introduction to Spring Cloud Contract

From the course: Advanced Spring: Effective Integration Testing with Spring Boot

Start my 1-month free trial

Introduction to Spring Cloud Contract

- [Narrator] We have written Green Tests for both web and client applications yet there is still a bug. How can you ensure that the contract between the consumer and the producer of the API works? To make things more interesting, imagine your application is dependent on 10 different services in the microservice environment. How would you test integrations between them? Would you deploy all microservices in the same environment and run an end to end test? Or would you use something like WireMock to mock out other services? Both come with their advantages and disadvantages. If we deploy all microservices and perform end to end we get the benefit of testing real communication between services which is as close as it gets to simulating production. But this comes at high price of having dedicated infrastructure with all servers, databases, and other dependencies. These tests can also be slow and flaky, meaning hard to debug and not so reliable in case data is inconsistent. In this case…

Contents