DSL (these are the packages you want to install):
Node:
Java:
ContractCase is a next-generation consumer-driven contract testing framework, building on many of the lessons from maintaining the excellent Pact contract testing framework. It is our belief that contract testing is the best way to get deployment confidence for your applications and services.
Read the documentation here.
Feedback welcome on github!
ContractCase is now available and allows defining contracts for:
- An HTTP Client
- An HTTP Server
- A function caller
- A function implementation
Feedback on the ContractCase API / DSL and (especially) naming conventions very welcome. However, the following caveats should be kept in mind:
- ContractCase doesn't currently support merging of contracts. This means that each contract must be defined in one test file (per contract).
- ContractCase currently is only compatible with Jest (js/ts) and JUnit (java).
- ContractCase currently only has minimal broker support. It supports the Pact broker, although the Pact broker isn't able to render ContractCase contracts in the UI.
Although the test coverage is high, and great care has been taken to ensure that the results are correct, there may still be bugs. Please open an issue if you experience any problems.
You can follow the detailed progress by reading the maintainer todo list. These caveats will be updated as progress is made.
We recommend starting with the getting started guide and following the examples in defining contracts.
ContractCase has a very similar philosophy to Pact, and to maximise Pact compatibility, ContractCase works with the Pact broker. We recommend either:
ContractCase is easier to extend, can express more complex contracts, doesn't restrict where you can use matchers when defining request / response pairs, and can define contracts at either the server side or the client side (although it is always consumer driven - your consumer just might be consuming requests). See for Pact users for more discussion.
- The Pact Broker for users wanting to host their own broke
- The excellent Pactflow Broker for those needing SaaS and enterprise features
Command line interface::
Definition DSL packages:
Connector Packages:
Core Package:
- Pact Parity (complete)
- Server driven contracts (complete)
- Plugins and arbitrary extensions (complete)
- Support java (complete)
- Support function-based contracts (complete)
- Documentation (in progress)
- gRPC matchers
- Support Python, C# and Go
- Arbitrary combinations of request/response pairs, incidentally including native SQS support
- Pass-through APIs
For the gory details of the roadmap, you can see the implementation notebook / todo list here
ContractCase releases follow semantic versioning, with two additional restrictions:
- Before 1.0.0, ContractContractCase is in Beta, and the API is considered unstable. Breaking changes will be indicated in minor version bumps- that is, 0.2.0 and 0.3.0 are not entirely compatible.
- Before 1.0.0, patch versions will always be backwards compatible.
Breaking changes will always be detailed in the changelog.