Past Meetup

Hands on Consumer Driven Contracts Workshop with Spring Cloud Contract

This Meetup is past

68 people went

Details

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" (https://www.packtpub.com/application-development/instant-mockito) and "Mockito Cookbook" (https://www.packtpub.com/application-development/mockito-cookbook) books. OSS Contributor. Co-founder of the Warsaw Groovy User Group and Warsaw Cloud Native Meetup (http://toomuchcoding.com/abstracts/www.meetup.com/Warsaw-Cloud-Native-Meetup/). Lead of Spring Cloud Sleuth (https://cloud.spring.io/spring-cloud-sleuth/), Spring Cloud Contract (https://cloud.spring.io/spring-cloud-contract/) and Spring Cloud Pipelines (https://cloud.spring.io/spring-cloud-pipelines/) projects at Pivotal (http://spring.io/)

Contributed to Groovy, Mockito, Rest-assured, Drools, Moco. Author of Uptodate Gradle plugin (https://github.com/marcingrzejszczak/uptodate-gradle-plugin), Spock subjects-collaborators extension (https://github.com/marcingrzejszczak/spock-subjects-collaborators-extension/), gradle-test-profiler (https://github.com/marcingrzejszczak/gradle-test-profiler), JSONAssert (https://github.com/marcingrzejszczak/jsonassert) and XMLAssert (https://github.com/marcingrzejszczak/xmlassert)open 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 (https://martinfowler.com/articles/consumerDrivenContracts.html) 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 (http://martinfowler.com/articles/consumerDrivenContracts.html) 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

Prerequisites

• Basic knowledge of Maven

• Basic knowledge of Git

• Run this to download all the necessary dependencies

$ git clone https://github.com/spring-cloud-samples/spring-cloud-contract-samples
$ cd spring-cloud-contract-samples
$ ./scripts/runAcceptanceTests.sh