Skip to content

Contract Testing: Pact and the Pact Broker - Executable Tutorial Proposal - #3110

Open
Gabjea wants to merge 3 commits into
KTH:2026from
Gabjea:Gabjea-executable-tutorial-proposal
Open

Gabjea wants to merge 3 commits into
KTH:2026from
Gabjea:Gabjea-executable-tutorial-proposal

Conversation

@Gabjea

@Gabjea Gabjea commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Assignment Proposal

Title

Contract Testing: Pact and the Pact Broker

Names and KTH ID

Deadline

  • Task 1

Category

  • Executable tutorial

Description

We will create an executable Killercoda tutorial on contract testing between microservices
with Pact. Everything runs in Docker (two Python services, the Pact Broker and its database),
with a Git hook standing in for CI, so no accounts are needed.

A user service renames a JSON field: its own tests pass, but the order service that depends
on it breaks. The learner writes a consumer contract with Pact (using type matchers so the
provider can still evolve), verifies the real provider against it using provider states, and
publishes the results to the Pact Broker. They then verify two consumer versions against three
provider versions and explore the resulting compatibility matrix. Starting from what is
recorded as deployed in production, they use can-i-deploy to discover that the rename can
only be released safely in three steps (expand, migrate, contract), with a Git pre-push hook
blocking unsafe deployments. Each step has an automated check, and the tutorial ends with a
reflection on when contract testing is worth it and its limits.

Intended learning outcomes. The learner can explain why separate test suites miss
breaking API changes, write and verify a Pact contract, read the compatibility matrix, and
use can-i-deploy to decide a safe deployment order.

Relevance
Contract testing lets teams deploy services independently: API
compatibility is checked in seconds in CI instead of in slow end-to-end environments, and
can-i-deploy acts as an automated deployment gate.

Gabjea added 2 commits October 2, 2026 17:53
This README outlines the proposal for a tutorial on contract testing using Pact and Docker. It details the tutorial's structure, intended learning outcomes, and relevance to DevOps practices.
@github-actions github-actions Bot added the tutorial One of the task categories listed in README.md label Oct 2, 2026
@Gabjea Gabjea changed the title Gabjea executable tutorial proposal Contract Testing: Pact and the Pact Broker - Executable Tutorial Proposal Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tutorial One of the task categories listed in README.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant