Freedom251 › Contract Testing Tools
ContractCase

What ContractCase is
ContractCase is an open source framework for consumer-driven contract testing, helping teams check whether services can communicate and whether deployments are compatible. Consumers define contracts against a mock provider, then providers verify them against the real service. A CLI can use verification results and the target environment to check whether a service is safe to deploy. Supported contract types include HTTP clients and servers, function callers, and function implementations. Contracts contain example-defined interactions, each of which runs independently during definition. The project lists Jest and Vitest for JavaScript or TypeScript and JUnit 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 identifies Pactflow as a SaaS broker option, but ContractCase contracts are not rendered in the Pact Broker UI. Contracts use ContractCase Case Files, with JSON for HTTP contracts. The project links downloads through npm and Maven Central and directs bug reports to GitHub. Contract merging is not supported, and versions before 1.0.0 are beta, with possible breaking changes in minor releases.
Who it suits
It suits development teams that need to define and verify service contracts across HTTP or function boundaries. Teams should account for its beta status and contract-file limitation.
What it does well
- Supports HTTP and function contract types
- Lists Jest, Vitest, and JUnit compatibility
- Plugins extend matchers, mocks, and DSL declarations
- CLI checks deployment safety against verification results
- Open source
What to know first
- Contract merging is not supported
- Pact Broker UI does not render its contracts
- Pre-1.0 versions may break in minor releases
- Failed verification does not throw by default
Limits
ContractCase is beta before version 1.0.0, and minor version releases may introduce breaking changes. Failed verification does not throw an error by default; setting `throwOnFail: true` changes that behavior.
Getting started
- Visit https://case.contract-testing.io/ for project information.
- Choose the npm or Maven Central download route linked by the project.
- Use a compatible test framework: Jest or Vitest for JavaScript or TypeScript, or JUnit for Java.
- Define contracts on the consumer side against a mock provider, then verify them against the real provider.
- Use a supported broker to record contract files, verification status, and deployment environment information.
- Run the CLI deployment check with verification results and the target environment.
Verdict
ContractCase covers contract definition, provider verification, and deployment checks across several service types. Its beta status, lack of contract merging, and broker UI limitation are important considerations.
Questions
How much does ContractCase cost?
ContractCase is free and open source.
Which contract types does it support?
It supports HTTP clients, HTTP servers, function callers, and function implementations.
Which test frameworks are compatible?
The project lists Jest and Vitest for JavaScript or TypeScript, and JUnit for Java.
Does ContractCase work with a contract broker?
It supports the Pact Broker and describes Pactflow as a SaaS broker option. ContractCase contracts are not rendered in the Pact Broker UI.
Where can I download it?
The project links to npm and Maven Central.
How can users report a bug?
The project directs users to GitHub to report bugs.
Facts from ContractCase's own pages
- 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. · github.com, 8 Oct 2026
- Broker integrations
- ContractCase supports the Pact contract broker and identifies Pactflow as a SaaS broker option. · case.contract-testing.io, 8 Oct 2026
- Broker limitation
- The documentation says the Pact broker cannot render ContractCase contracts in its UI. · github.com, 8 Oct 2026
- Broker use
- The documentation says a broker records contract files, verification status, and deployment environment information, and is needed for deployment confidence. · case.contract-testing.io, 8 Oct 2026
- Contract definition
- Contracts are defined on the side of the communication boundary that consumes information and later verified on the side that provides it. · case.contract-testing.io, 8 Oct 2026
- Contract lifecycle
- Its workflow covers defining contracts, verifying them against providers, and checking compatibility at deployment time. · case.contract-testing.io, 8 Oct 2026
- Contract merging limit
- ContractCase does not currently support merging contracts, so each contract must be defined in one test file. · github.com, 8 Oct 2026
- Contract types
- The project says it supports contracts for HTTP clients, HTTP servers, function callers, and function implementations. · github.com, 8 Oct 2026
- Contract workflow
- It defines contracts against a mock provider, then verifies those contracts against the real provider. · case.contract-testing.io, 8 Oct 2026
- Deploy checks
- The CLI can check whether a service is safe to deploy based on verification results and the target environment. · case.contract-testing.io, 8 Oct 2026
- Downloads
- The official site links to npm and Maven Central as download locations. · case.contract-testing.io, 8 Oct 2026
- Example-based interactions
- A contract consists of interactions defined by example, and each interaction runs independently during contract definition. · case.contract-testing.io, 8 Oct 2026
- Extensibility
- Plugins can add matcher types, mock types, and DSL declarations; plugins are written in JavaScript or TypeScript compiled to JavaScript. · case.contract-testing.io, 8 Oct 2026
- Notable limitation
- ContractCase does not currently support merging contracts, so each contract must be defined in one test file. · github.com, 8 Oct 2026
- Package availability
- The project links to npm and Maven Central for downloads. · case.contract-testing.io, 8 Oct 2026
- Plugin language
- Plugins must be written in JavaScript or TypeScript compiled to JavaScript. · case.contract-testing.io, 8 Oct 2026
- Purpose
- ContractCase is a consumer-driven contract testing framework intended to help teams check whether services can communicate and deploy with confidence. · case.contract-testing.io, 8 Oct 2026
- Release status
- The project states that versions before 1.0.0 are beta and that breaking changes may occur in minor releases. · case.contract-testing.io, 8 Oct 2026
- Stability
- ContractCase is in beta before version 1.0.0, and its API may have breaking changes in minor version bumps. · case.contract-testing.io, 8 Oct 2026
- Support channel
- The project directs users to report bugs through GitHub. · case.contract-testing.io, 8 Oct 2026
- Supported contract types
- The project README lists HTTP clients, HTTP servers, function callers, and function implementations. · github.com, 8 Oct 2026
- Support route
- The official site links users to GitHub to report a bug. · case.contract-testing.io, 8 Oct 2026
- Test framework support
- The project README lists compatibility with Jest and Vitest for JavaScript or TypeScript and JUnit for Java. · github.com, 8 Oct 2026
- Test runners
- The project README lists Jest and Vitest for JavaScript or TypeScript, and JUnit for Java, as compatible test frameworks. · github.com, 8 Oct 2026
Where ContractCase stands on Freedom251
- Contract Testing Tools#22 of 22
