For consumer-driven contracts written in code, Pact is the framework to start with, and PactFlow is its hosted broker with a free Starter plan. If you'd rather generate tests straight from an OpenAPI file, look at Specmatic, Schemathesis or Dredd. Spring teams have Spring Cloud Contract, Microcks covers event-driven APIs, Karate folds contracts into wider testing, and Hoverfly Cloud simulates APIs.
A word on how this list was made before you trust any of it. In December 2026 I read each vendor's homepage, documentation or pricing page and took every entry and table cell from that text. I didn't run a contract test against any of these tools, so read the entries as a summary of what each vendor publishes. Three other names came up in my research and were dropped: one site wouldn't load, and two pages I read didn't describe contract testing.
Contract testing checks that two services still agree on the messages they swap, without spinning up the whole system for an end-to-end run. The tools below come at that from different directions: some start from consumer tests written in code, some start from a spec file, and some simulate the other side so you can test in isolation.
Nine contract testing tools and what each one does
Pact
Pact is a code-first tool for testing HTTP and message integrations, and its docs explain the consumer-driven idea: provider behaviour no current consumer uses stays free to change. Skip it if nobody on the team writes test code.
PactFlow
Now under the Swagger brand, PactFlow runs the open-source Pact framework alongside bi-directional testing against an OpenAPI spec, hosted or on-premise. Its free Starter plan allows unlimited users. Skip it if you'll outgrow two integrations before any budget arrives.
Specmatic
Point Specmatic at an OpenAPI, AsyncAPI, gRPC, GraphQL or WSDL file and it builds tests, mocks and compatibility checks with no test code. Skip it if you need Kafka, gRPC or GraphQL contracts free, since its pricing page lists them under Enterprise.
Spring Cloud Contract
This Apache-2.0 project supports consumer-driven contracts and service schemas in Spring applications, with verifier, stub runner and WireMock modules. Its README says Stubborn.sh has taken over maintenance. Skip it if your services aren't built on Spring.
Schemathesis
An MIT-licensed tester, Schemathesis generates tests from OpenAPI, GraphQL and gRPC schemas and can chain calls into multi-step workflows. It runs through uvx, Docker or a GitHub Action. Skip it if your API has no schema file to feed it.
Dredd
Dredd is a language-agnostic command-line tool that checks an API description against the backend behind it, with hooks in Go, Node.js, Perl, PHP, Python, Ruby and Rust. Skip it if you need settled OpenAPI 3 support, which its docs call experimental.
Karate
Karate Labs lists contract testing as one feature of Karate Core, its open-source API, UI and performance testing engine, plus a free Xplorer desktop IDE tier. Skip it if you'd rather have a single-purpose checker than a whole test suite.
Microcks
A Cloud Native Computing Foundation incubating project, Microcks runs provider and consumer contract tests on live implementations across OpenAPI, AsyncAPI, gRPC, GraphQL and SOAP. Skip it if your team can't host containers, because it's deployed on your own infrastructure or laptops.
Hoverfly Cloud
Hoverfly Cloud is a hosted API simulation platform: you can build a simulation from Swagger or by capturing traffic, and the Professional plan simulates latency and random failures. Skip it if you need a provider verified against consumer expectations, which its page doesn't cover.
Contract testing tools side by side: what the vendor pages say
Every cell below is taken from the vendor's own page text. Not published means I searched that page for the point and found nothing.
| Tool | Approach | Formats or protocols named | Where it runs | Free route on the page |
|---|---|---|---|---|
| Pact | Consumer-driven, code-first | HTTP and message integrations | In your own test code | Not published |
| PactFlow | Pact plus bi-directional OpenAPI testing | OpenAPI | Hosted or on-premise | Starter plan, 2 integrations |
| Specmatic | Tests and mocks generated from the spec | OpenAPI, AsyncAPI, gRPC, GraphQL, WSDL | CLI and programmatic engine | Open Source plan: OpenAPI, WSDL, MCP |
| Spring Cloud Contract | Consumer-driven contracts in Spring | HTTP and message-based interactions | Spring applications | Apache-2.0 licence |
| Schemathesis | Tests generated from a schema | OpenAPI 2.0 to 3.2, GraphQL, gRPC | uvx, Docker, GitHub Actions, GitLab CI | MIT license |
| Dredd | API description checked against the backend | API Blueprint, OpenAPI 2, OpenAPI 3 (experimental) | CLI on Linux, macOS, Windows | Not published |
| Karate | Contract testing inside a wider test engine | Kafka, gRPC, WebSocket, Webhook, SSE (Enterprise pack) | IntelliJ, VS Code, Xplorer desktop | Karate Core open source; Xplorer free tier |
| Microcks | Provider and consumer tests on live services | OpenAPI, AsyncAPI, gRPC/Protobuf, GraphQL, SOAP | On-premises, cloud or laptop | Open source |
| Hoverfly Cloud | Hosted API simulation | Swagger import | Hosted | 14-day free trial |
Two patterns stand out. Apart from the trial-only and Not published rows, the last column names a free plan or an open-source licence, so you can trial the approach before anyone signs anything. And the approach column splits into three camps: tools that start from consumer expectations, tools that start from a spec, and tools that put contracts inside something broader.
Want AI doing the heavy lifting in your marketing?
I build the systems that handle the boring 80 percent, so you get your week back. Done properly, with the human kept in.
Do you make contract testing tools? Tool makers can ask to be considered for a featured place on this list.
Which one fits: picking a contract testing tool by situation
Your consumers are other teams in the same company. This is where consumer-driven contracts shine. Each consumer team writes a test describing the calls it makes and the responses it needs, and that test produces a contract file. The provider then replays those contracts against its own build. The payoff is that the provider learns exactly which fields are in use, and can change everything else freely. The cost is discipline: consumer teams have to write and maintain the tests, and you need somewhere to publish contracts so the provider pipeline can fetch them. That's the job of a broker, self-hosted or bought as a service.
Your API already has an OpenAPI file that people keep up to date. Spec-driven tools treat that file as the contract. They read it, generate requests and check the live service answers in the shape the spec promises. There's no test code to write for the basic run, which makes them easy to bolt on. The trade-off is that a spec tells you what the provider says it does, not what any consumer relies on, so a field nobody uses gets the same protection as one that ten apps need.
You'd like the bugs the spec doesn't mention. Schema-driven fuzzers push generated and boundary values at every operation and report crashes and responses that drift from the documented shape. Schemathesis publishes its own runs against open-source projects as evidence; those are the vendor's numbers, not mine. This is closer to robustness testing than to a classic contract, and it sits well alongside one.
Your services talk through Kafka, queues or gRPC. Read the formats column before anything else. Message and event support varies from row to row, and in two rows those protocols sit in a paid tier rather than the open-source core.
The team is all-in on one framework. A framework-specific contract tool can feel native, with stubs generated straight into your build. Check who maintains it, though: one project's README in this list says a new maintainer has taken over.
The other side doesn't exist yet. When a partner API is slow, rate-limited or not built yet, a simulator gives you a stand-in to test against. That's service virtualisation rather than contract verification, so pair it with a contract tool if you need both. For the wider testing stack around contracts, my guide to API testing tools covers functional and load testing.
Where contract testing goes wrong, and the early signs
- Contracts that copy the whole response. If a consumer test asserts every field, the provider can't change anything without breaking it. Assert only the fields the consumer reads; a contract that mirrors the full payload is an end-to-end test in disguise.
- No way to share contracts. Contract files sitting in a consumer repo that the provider never fetches protect nobody. Before you pick a tool, decide where contracts are published and how the provider pipeline pulls them.
- Provider verification that runs once a week. The check has to run on every provider change, before deploy, or a breaking change reaches production first. If verification lives in a nightly job, move it into the pull request pipeline.
- A spec that drifts from reality. Spec-driven testing is only as honest as the spec. If developers edit the code and forget the OpenAPI file, the tests keep passing against a fiction. Fail the build when the live response doesn't match the documented one.
- Mocks nobody verifies. A consumer team testing against a hand-written mock can pass every test while the real provider has moved on. Generate mocks from the same contract the provider verifies, so both sides share one source.
- Format support assumed, not checked. An experimental OpenAPI 3 label or an event protocol held back for an enterprise tier is easy to miss on a quick scan. Match the formats column to your real specs before a pilot.
Want your tool on this list? Featured spots and reviews here are paid partnerships. Here's how to partner with me.
Frequently asked questions
What is contract testing?
It's a way to check that two services agree on the requests and responses they exchange, by testing each side against a shared contract instead of running both together. It catches integration breaks earlier and faster than an end-to-end suite.
What's the difference between consumer-driven and spec-driven contract testing?
Consumer-driven testing starts from tests written by the services that call an API, so the contract holds only what consumers use. Spec-driven testing treats the provider's OpenAPI or similar file as the contract and checks the service against it.
Is there a free contract testing tool?
Yes. The free route column in my table shows which ones: it lists open-source licences and free plans taken from the vendors' own pages, plus one trial-only tool. Limits apply: PactFlow's Starter caps integrations at 2, and Specmatic leaves Kafka, gRPC and GraphQL to Enterprise.
Is contract testing the same as API mocking?
No. A mock or simulation stands in for a service so you can test without it. Contract testing proves the real service still matches what consumers expect. Many teams use both, ideally with mocks generated from the verified contract.


