Practical contract testing with Pact

Contract testing is an approach that addresses the challenges of large-scale integration and E2E testing in distributed systems. It is not a new technique, in fact, it has been around for several years now, but unfortunately there aren't many good introductions, examples and use cases that clearly show the added value of contract testing, and how it can help speed up integration testing.

This course is designed to change that. Through hours of videos, quizzes and hands-on programming exercises, you will learn everything you need to know about contract testing, Pact and the tools in the Pact ecosystem.

So, what can you expect from this course? Here's the course outline for you:

Setting the stage
  • The context for this course
  • The current testing process and its challenges
Contract testing - concepts
  • What is a contract?
  • What is contract testing?
  • How is contract testing different from other approaches to integration testing?
  • How is contract testing different from schema validation?
  • Where does contract testing fit into your testing strategy?
  • Different approaches to contract testing
The Pact ecosystem
  • Introducing Pact and the Pact ecosystem
  • Introducing the Pact CI/CD implementation guide
Generating consumer contracts (available for Java, other languages coming soon)
  • What goes into a consumer contract?
  • Preparing your machine for the hands-on exercises
  • Generating a consumer contract
  • Defining provider states
  • Dealing with optional fields
Publishing consumer contracts
  • Introducing the Pact Broker
  • Publishing our contracts using the Pact CLI tools
  • Publishing our contracts using the Pact Maven plugin
  • Consumer contract versioning
Verifying consumer contracts (available for Java, other languages coming soon)
  • Provider-side contract verification
  • Publishing provider verification results
  • Exploring the Pact verifier logs
Continuous Integration (available for Java, other languages coming soon)
  • Generate and publish consumer contracts in your pipeline
  • Verify contracts and publish verification results in your pipeline
  • Using webhooks
can-i-deploy
  • What does can-i-deploy do?
  • Adding can-i-deploy to your pipeline
What happens when our software evolves?
  • Introducing a change as a consumer
  • Branches and pending pacts
  • Updating the provider implementation

Consumer-driven contract testing implementation challenges

  • Consumer-driven contract testing implementation challenges

Bidirectional contract testing (available for Java, other languages coming soon)

  • The bidirectional contract testing flow
  • Generating and publishing consumer contracts
  • Publishing provider contracts and verification by PactFlow
  • Bidirectional or consumer-driven contract testing?
Where to from here?
  • Tips on getting started with contract testing

Additional material and resources

  • The Pact plugin framework
  • Generating Pact code with AI
  • The Pact Slack channel

As you can see, there's something in there for everyone. Are you ready to learn about contract testing? Let's get started!


Your Instructor


Bas Dijkstra
Bas Dijkstra

Hey, my name is Bas Dijkstra, and I am an independent test automation consultant and trainer.

I have been active in the test automation field for some 19 years now, and I have worked on software testing and automation solutions across a wide range of programming languages, frameworks and technology stacks.

I’ve delivered test automation training to dozens of companies and hundreds of conference attendees in the Netherlands as well as abroad, to excellent reviews.

You can find a complete overview of my professional life on my LinkedIn profile.

I’m also the developer of RestAssured.Net, a library that is meant to to make writing tests for HTTP APIs in C# a breeze.

I live in Amersfoort, The Netherlands, together with my wife and two sons. When I am not at work, I like to go outside for a run or a long bike ride, or to sit down and read a good book.


Course Curriculum


  Introduction to the course
Available in days
days after you enroll
  Consumer-driven contract testing implementation challenges
Available in days
days after you enroll
  Where to from here?
Available in days
days after you enroll
  Additional material and resources
Available in days
days after you enroll

Frequently Asked Questions


When does the course start and finish?
The course starts now and never ends! It is a completely self-paced online course - you decide when you start and when you finish.
How long do I have access to the course?
How does lifetime access sound? After enrolling, you have unlimited access to this course for as long as you like - across any and all devices you own.
What if I am unhappy with the course?
We would never want you to be unhappy! If you are unsatisfied with your purchase, contact us in the first 30 days and we will give you a full refund.
I would like to do the exercises in C# / JavaScript / ...
At the moment, the exercises in this course are available in Java only. I am working hard on making the same exercises available in other languages, too. First, C#, next up, JavaScript / TypeScript. After that, maybe Python, too.
Are there any technical prerequisites?
Everything you'll need to complete the hands-on programming exercises will be introduced in the course videos, and detailed installation instructions will be provided, but here's a list: * A recent JDK (21 or newer) - if you want to do the exercises in Java * The current LTS version of .NET - if you want to do the exercises in C# * A recent Node.JS installation - if you want to do the exercises in JavaScript / TypeScript * An IDE of your choice * A free PactFlow account - this can be obtained from https://pactflow.io/try-for-free/ * The Pact CLI tools - you can get these from https://github.com/pact-foundation/pact_broker-client/releases

Get started now!