Past Meetup

Hands on Consumer Driven Contracts Workshop with Spring Cloud Contract

This Meetup is past

68 people went


We have Marcin Grzejszczak the creator and lead of Spring Cloud Contract visiting Toronto. He will be leading a full day (9:30 AM to 4:30 PM) hands on workshop on Consumer Driven Contracts.

Bring your laptop and be ready to have some fun turbo charging the automated testing of your microservices. No previous experience with microservtices or spring cloud contract required.

Marcin Grzejszczak is the author of "Mockito Instant" ( and "Mockito Cookbook" ( books. OSS Contributor. Co-founder of the Warsaw Groovy User Group and Warsaw Cloud Native Meetup ( Lead of Spring Cloud Sleuth (, Spring Cloud Contract ( and Spring Cloud Pipelines ( projects at Pivotal (

Contributed to Groovy, Mockito, Rest-assured, Drools, Moco. Author of Uptodate Gradle plugin (, Spock subjects-collaborators extension (, gradle-test-profiler (, JSONAssert ( and XMLAssert ( source projects.

Workshops Overview

Changing a published API over time is hard due to backward compatibility concerns. This is even more of an issue in a microservice architecture with 100's of microservices that each publish and API. Consumer Driven Contracts ( is an effective service evolution pattern. In this workshop we will explain the ideas behind Consumer Driven Contracts and show how to implement them easily with Spring Cloud Contract.

Spring Cloud Contract is an umbrella project holding solutions that help users in successfully implementing the Consumer Driven Contracts ( approach.

Topics Covered

• Introduction to Consumer Driven Contracts

• Introduction to Spring Cloud Contract

• what modules does Spring Cloud Contract consist of (Verifier, Stub Runner)

• description of what the DSL contains for HTTP and Messaging

• automatic test generation from DSL

• ways of defining base classes for the generated tests

• how to work with Rest Docs

• Contracts on the producer side (in pairs)

• simple DSL examples for HTTP & Messaging

• Contracts that lay in an external repository (in pairs)

• simple DSL examples for HTTP & Messaging

• Spring Cloud Contract with Rest Docs (in pairs)

• generating stubs using Rest Docs

• generating contracts using Rest Docs

• Contracts on the producer side (single person teams)

• more sophisticated DSL manipulations (regexs, code execution, referencing request from response)

• working with stub and test matchers

• contracts representing scenarios (stateful stubs)

• creating a library with common code shareable between teams

• stubbing out service discovery

• stubs per consumer feature

• classpath scanning

• using JUnit rule

• Stub Runner Boot


• Basic knowledge of Maven

• Basic knowledge of Git

• Run this to download all the necessary dependencies

$ git clone
$ cd spring-cloud-contract-samples
$ ./scripts/