Live a happier life using Spring Cloud Contract

Fabian Krüger


Microservice Architectures became the number one architectural style of today. But testing the interaction between the services is often a nightmare. But don’t panic, Spring Cloud Contract comes to the rescue. In this workshop we’ll look at how to leverage SCC to test a microservice Architecture.

For sure, you are a good citizen!

You write a whole set of unit and integration tests for your neat and beautiful microservices. It’s all clean code for sure. The message topics, along with REST APIs provided by other Teams, are used as agreed upon in a whole series of meetings, emails and slack messages.

But then … comes the day when you need to integrate your microservice into the landscape of existing microservices … and … BOOM! Consumed APIs and message formats suddenly changed last minute. But somehow the information didn’t reach you. You’re wondering - was it communicated at all? You need to work overtime, your boss is unhappy, your family is unhappy, you’re unhappy and testers file another bug - again!

Have you been there? Do you want to escape this cycle? Do you want a happier life?

Then this workshop is for you! Come in and see how Spring Cloud Contract can come to your rescue. Learn how to use Spring Cloud Contract to verify with generated tests and stubs that REST-APIs and messages provided by producers finally conform to the contract they have with their consumers and …

… get home on time to see your happy family, make your boss happy and let testers file less bugs.

What to expect

  • Learn how to write contracts for messaging and REST APIs
  • Test producer code using Spring Cloud Contract
  • Verify that consumers work with the API defined in the contract by using stubs generated by Spring Cloud Contract
  • Learn how to guarantee that the producer will provide the API that the consumer expects
  • Learn how to live happier using Spring Cloud Contract

Technical Requirements

  • JDK 8 (or higher)
  • GIT
  • GitHub account
  • IDE (I know IntelliJ best)
  • Required Knowledge
  • Spring Boot
  • Spring Boot Testing


Fabian Krüger (@hiiamfabian) arbeitet seit mehr als 15 Jahren im Bereich Softwareentwicklung mit verschiedenen Technologien in unterschiedlichen Rollen und Industriezweigen.

Seit 2019 arbeitet er bei VMware Pivotal Labs (vormals Pivotal) als Senior Solutions Architect für Spring/Java.

Dabei unterstützt und berät er Kunden bei Entwicklung und Modernisierung von Applikationen für den Einsatz moderner Cloud Technologien wie Kubernetes und Cloudfoundry.

Fabian ist Spring Enthusiast und interessiert sich für alle Themen rund um Softwarearchitektur, Softwarequalität, Clean Code und Testautomation.

Eine Veranstaltung des iJUG e.V., organisiert durch die JUG Darmstadt.