ContractCase
case.contract-testing.io
- API
What ContractCase is
ContractCase is a free, open-source consumer-driven contract testing framework for checking communication between services and assessing deployment compatibility. Teams define contracts on the consumer side against a mock provider, then verify them against the real provider. Its workflow also includes deployment checks based on verification results and the target environment. Supported contract types include HTTP clients, HTTP servers, function callers, and function implementations. Contracts contain example-based interactions, with each interaction running independently during definition. Jest and Vitest are listed for JavaScript or TypeScript projects, while JUnit is listed for Java. Plugins can add matcher types, mock types, and DSL declarations; they must be written in JavaScript or TypeScript compiled to JavaScript. ContractCase supports the Pact Broker and describes Pactflow as a SaaS option, although Pact Broker does not render ContractCase contracts in its interface. Contracts use Case Files, with JSON for HTTP contracts. Downloads are linked through npm and Maven Central.
Who it suits
It suits development teams that need consumer and provider verification for APIs or functions, plus deployment checks. It is also relevant to JavaScript, TypeScript, and Java teams using the listed test frameworks.
Good to know, and what to watch
- Free and open source
- Supports HTTP and function contracts
- Works with Jest, Vitest, and JUnit
- Plugins extend matchers, mocks, and DSLs
- CLI checks deployment safety
- No contract merging support
- Pact Broker UI cannot render contracts
- Pre-1.0 releases may introduce breaking changes
- Failed verification does not throw by default
The verdict
ContractCase combines consumer-defined examples, provider verification, and deployment checks in one workflow. Its beta status, single-file contract requirement, and broker UI limitation are important considerations.
What the maker publishes
- Broker integration
- ContractCase supports the Pact Broker, while its contracts are not rendered in the Pact Broker UI; the documentation also describes Pactflow as a SaaS broker option. source
- Broker integrations
- ContractCase supports the Pact contract broker and identifies Pactflow as a SaaS broker option. source
- Broker limitation
- The documentation says the Pact broker cannot render ContractCase contracts in its UI. source
- Broker use
- The documentation says a broker records contract files, verification status, and deployment environment information, and is needed for deployment confidence. source
- Contract definition
- Contracts are defined on the side of the communication boundary that consumes information and later verified on the side that provides it. source
- Contract lifecycle
- Its workflow covers defining contracts, verifying them against providers, and checking compatibility at deployment time. source
- Contract merging limit
- ContractCase does not currently support merging contracts, so each contract must be defined in one test file. source
- Contract types
- The project says it supports contracts for HTTP clients, HTTP servers, function callers, and function implementations. source
- Contract workflow
- It defines contracts against a mock provider, then verifies those contracts against the real provider. source
- Deploy checks
- The CLI can check whether a service is safe to deploy based on verification results and the target environment. source
- Downloads
- The official site links to npm and Maven Central as download locations. source
- Example-based interactions
- A contract consists of interactions defined by example, and each interaction runs independently during contract definition. source
- Extensibility
- Plugins can add matcher types, mock types, and DSL declarations; plugins are written in JavaScript or TypeScript compiled to JavaScript. source
- Notable limitation
- ContractCase does not currently support merging contracts, so each contract must be defined in one test file. source
- Package availability
- The project links to npm and Maven Central for downloads. source
- Plugin language
- Plugins must be written in JavaScript or TypeScript compiled to JavaScript. source
- Purpose
- ContractCase is a consumer-driven contract testing framework intended to help teams check whether services can communicate and deploy with confidence. source
- Purpose
- ContractCase is a consumer-driven contract testing framework for checking whether services can communicate as expected. source
- Release status
- The project states that versions before 1.0.0 are beta and that breaking changes may occur in minor releases. source
- Stability
- ContractCase is in beta before version 1.0.0, and its API may have breaking changes in minor version bumps. source
- Support channel
- The project directs users to report bugs through GitHub. source
- Supported contract types
- The project README lists HTTP clients, HTTP servers, function callers, and function implementations. source
- Support route
- The official site links users to GitHub to report a bug. source
- Test framework support
- The project README lists compatibility with Jest and Vitest for JavaScript or TypeScript and JUnit for Java. source
Checked against the maker's pages on 8 Oct 2026.