Skip to Content
Mastering Spring Cloud
book

Mastering Spring Cloud

by Piotr Mińkowski
April 2018
Intermediate to advanced content levelIntermediate to advanced
432 pages
10h 38m
English
Packt Publishing
Content preview from Mastering Spring Cloud

Using Spring Cloud Contract

Spring Cloud Contract presents a slightly different approach to contract testing than Pack. While in Pack the consumer is responsible for publishing the contract, in Spring Cloud Contract the initiator of this action is the provider. The contracts are stored in a Maven repository as JARs, containing the stubs automatically generated based on the contract definition file. These definitions may be created using the Groovy DSL syntax. Each of them consists of two main parts: the request and the response specification. On the basis of these files, Spring Cloud Contract generates JSON stub definitions, which are used by WireMock for integration testing on the client side. In contrast to Pact, which is used as the tool ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Microservices with Spring Boot and Spring Cloud - Second Edition

Microservices with Spring Boot and Spring Cloud - Second Edition

Magnus Larsson

Publisher Resources

ISBN: 9781788475433Supplemental Content