Consumer Driven Contracts on the JVM

Conference talk covering API-testing with Pact-JVM. Code examples written in Kotlin and Java.

Intended audience

Whenever you have applications that consume data from API’s, you soon or later experience one of several different scenarios typical for most developers: upgraded API’s, deprecated or deleted fields, changed data structures and value types are all examples that developers often deal with.

Ensuring that independently deployable applications won’t fail in complex environments is an essential task when developing distributed services. In governmental institutions and public sector organizations, it’s often even more difficult as they require multiple different components, external Web Services and API’s to communicate and interact together. Adding to the complexity is communication between your own micro-services in modularized architectures. Consumer Driven Contracts is a way to deal with these challenges.

In this talk, I will tell you how to make sure components that consume and provide data can be deployed safely by writing tests that verify the interactions between your consumers and the API’s they consume. You will be introduced to Pact, one of the most popular and active open source projects for Consumer Driven Contracts and learn how to use it with JVM-applications. What are the possibilities and limitations? Which of Pact’s many variations should you use?

I will answer these questions by sharing my experiences on how we introduced Pact in the Norwegian Labour and Welfare Administration and why we had to contribute to the open source project itself.

Norwegian and English


Gradle and Kotlin

Maven and Java

Conference Video
JavaZone 2018