API Contract Testing
Consumer-driven contract testing framework and broker
View the interactive project page →
API Contract Testing
Part of the worlds-biggest-software-project initiative.
An AI-native, open-source consumer-driven contract testing framework and broker that lets microservice teams deploy independently with confidence.
API Contract Testing is a framework and contract broker for engineering organisations running microservices at scale. It replaces slow, brittle end-to-end integration test environments with fast in-pipeline contract verification, and uses AI to remove the manual effort of authoring and maintaining consumer tests.
Why API Contract Testing?
- The leading open-source option (Pact) has a steep learning curve and provider state setup that becomes hard to maintain as service graphs grow.
- The most ergonomic managed experience (PactFlow) starts at roughly $299/month and locks key features such as bi-directional contract testing and AI-assisted test generation behind a proprietary SmartBear product.
- Provider-driven alternatives such as Spring Cloud Contract are tied to the JVM/Spring ecosystem and offer little value to polyglot teams.
- Spec-based tools (Dredd, Postman Contract Testing) validate structure but have no concept of consumers, no
can-i-deploygate, and no contract brokering. - Cross-cutting gaps remain across the whole market: auto-generating consumer tests from real traffic, detecting semantic drift beyond schema changes, multi-step workflow contracts, and cross-service deployment impact scoring are absent or immature in every existing tool.
Key Features
Consumer-Driven Contract Core
- Consumer-driven HTTP contract generation from test code in multiple languages (JavaScript, Python, Java, Go)
- Provider verification against published contracts with structured pass/fail reporting
- Mock provider for capturing consumer expectations during test execution
- Flexible matching DSL (type, regex, date/time, includes, array-each-like) for resilient assertions
Contract Broker & Deployment Safety
- Shared broker to publish, retrieve, and version contracts with consumer/provider metadata
can-i-deploydeployment gate that confirms consumer/provider compatibility per environment- Webhook system to trigger provider verification builds when contracts are published
- Contract network visualisation showing compatibility across all consumer/provider pairs
Bi-Directional & Multi-Protocol Support
- Bi-directional contract testing: accept an OpenAPI spec from the provider and tool-generated consumer contracts for static compatibility comparison, lowering onboarding friction
- gRPC / Protobuf contract support via plugin or native integration
- AsyncAPI / Kafka contract testing for event-driven microservices
- Backlog support for Arazzo multi-step workflow contracts
CI/CD Integration
- CLI tooling with machine-readable output (JUnit XML, JSON)
- Integrations for GitHub Actions, Jenkins, GitLab CI, and CircleCI
- Webhook delivery to Slack, GitHub commit statuses, and arbitrary HTTP endpoints
AI-Native Advantage
Existing tools require teams to hand-write consumer tests and manually maintain provider state fixtures. This project uses AI to auto-generate consumer Pact tests from observed API call patterns in integration test logs or production traffic, translate plain-English behaviour descriptions into valid contracts, and detect semantic drift that schema validation alone misses (such as changed enum values or altered pagination behaviour). For provider changes, AI performs cross-service impact analysis across the contract network and produces a deployment risk score before code is merged. Stub generation for third-party APIs uses publicly available OpenAPI specs or recorded traffic to produce realistic consumer-side mocks where no Pact ecosystem exists.
Tech Stack & Deployment
- Self-hosted broker (Docker, Kubernetes) and an optional managed cloud mode
- Language SDKs targeting JavaScript/Node, Python, Java/JVM, and Go for the MVP, with additional ecosystems following the Pact precedent
- Aligned with the Pact Specification v4 JSON interchange format, OpenAPI 3.x, AsyncAPI 3.x, and Semantic Versioning for contract files
- CLI-first workflow with REST API and webhooks for programmatic control
Market Context
The API testing market reached approximately $2.14 billion in 2026 and is growing at a 22.2% CAGR, driven by microservices complexity and the demand for safer independent deployments. Open-source Pact and a self-hosted Pact Broker are free; PactFlow Cloud starts at roughly $299/month. Primary buyers are backend and platform engineering teams running microservices at scale, QA engineers replacing slow integration environments with in-pipeline contract verification, and architects setting testing standards across multi-team organisations.
Project Status
This project is in the research and specification phase.
Contributions, feedback, and domain expertise are welcome.
Contributing
We welcome contributions from developers, domain experts, and potential users. See CONTRIBUTING.md for guidelines.
Important: All contributions must be your own original work or clearly attributed open-source material with a compatible licence. Copyright infringement and licence violations will not be tolerated and will result in immediate removal of the offending contribution. If you are unsure whether a piece of code, text, or other material is safe to contribute, open an issue and ask before submitting.
Licence
Licence to be determined. See discussion for context.