Skip to content
Kumar Chandrachooda
Series

Contract Testing with Pactify

In reading order.

  • 8 parts
  • ≈ 48 min total
  • 8 published
Part 1 18 Aug 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 09 Sep 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 13 Oct 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 20 Nov 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 27 Dec 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 03 Feb 2026 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 07 Mar 2026 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 29 Mar 2026 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.