Skip to content
kc@kumarChandrachooda.com:~$ cd /blog/series/contract-testing-with-pactify && read --section="top" 0%
Series

Contract Testing with Pactify

In reading order.

  • 8 parts
  • ≈ 48 min total
  • 8 published
Part 1 21 Jul 2025 6 min read

Your Integration Tests Are Lying to You

Unit tests mock what you assume, end-to-end tests tell you too late - consumer-driven contract testing closes the gap, and a small open-source .NET library called Pactify is the clearest way I know to learn how it works. Part 1 of a series.

Part 2 22 Jul 2025 5 min read

The Consumer Writes the Contract

A walk through Pactify's PactMaker fluent API - the two-interface builder trick that hides Build() from you, why the consumer test always passes, and the uninitialized-object surprise inside WithBody<T>().

Part 3 23 Jul 2025 6 min read

What's Inside a Pact File

An annotated tour of the JSON document Pactify produces - the serializer settings that shape it, the snake_case field inherited from Pact v1, and the unusual decision to ship the consumer's matching options inside the contract itself.

Part 4 24 Jul 2025 6 min read

Publishing Pacts: From Shared Folder to Broker

How a pact travels from the consumer's pipeline to the provider's - Pactify's file and HTTP publishers, Pact Broker URL anatomy, and the unchecked response status that makes a failed publish silently pass your build.

Part 5 24 Jul 2025 6 min read

Replaying the Contract Against a Real API

The provider side of Pactify - how CreateFor<Startup> hosts your whole API in memory with TestServer, why interactions verify concurrently, the SmartFormat trick behind endpoint templating, and the discovery that Given(...) never runs.

Part 6 25 Jul 2025 7 min read

How Pactify Decides You Broke the Contract

A line-by-line read of Pactify's matching engine - top-level-only body comparison, header names that ignore your casing option, nested objects that can never match, and two format-string bugs that crash the error path.

Part 7 26 Jul 2025 5 min read

Serving Your Contracts Over HTTP

Pactify.AspNetCore in one sitting: an attribute, an assembly scan, and a /pacts/{provider} endpoint that serves your contract classes as live JSON - plus what a runtime contracts endpoint is really for.

Part 8 26 Jul 2025 7 min read

When Contract Testing Pays for Itself

The series retrospective - what a thirty-file library taught me that a full-featured one couldn't, Pactify's honest limit list versus PactNet, the broker maturity ladder, and the org-shaped question hiding under the tooling.

Which CV would you like?

Pick the one closest to the role. Each is two pages and carries the same facts.

Applied AI

Agentic AI & Cloud Engineer · multi-agent systems, RAG and MCP on AWS

Cloud & .NET

C#, .NET 10 and ASP.NET Core microservices on AWS and Azure · Terraform & AWS CDK

Data Engineering

AWS lakehouse · Kinesis, Glue (PySpark), Apache Iceberg, Lake Formation

Everything

All three domains, with the standout project from each