JVM implementation of Pact for consumer-driven contract testing, providing mock services and verification tools.
Pact-JVM is a JVM-based implementation of the Pact consumer-driven contract testing framework. It allows service consumers to define expected interactions with providers through a mock service and DSL, then verifies those contracts against the actual provider implementation. This approach enables teams to test both sides of an integration point using fast unit tests rather than slow, brittle end-to-end tests.
JVM developers and teams building microservices or distributed systems who need reliable integration testing between services, particularly those using Java, Kotlin, Scala, or Groovy.
Pact-JVM provides a standardized, language-agnostic way to implement consumer-driven contract testing on the JVM, with extensive framework support and tooling integration. It enables teams to catch integration issues early, reduce testing complexity, and improve deployment confidence without requiring full staging environments.
JVM version of Pact. Enables consumer driven contract testing, providing a mock service and DSL for the consumer project, and interaction playback and verification for the service provider project.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Supports Java, Groovy, Scala, Clojure through dedicated libraries, as evidenced by the multiple artefact listings and language-specific sections in the README.
Includes plugins for Gradle, Maven, Leiningen, and SBT, allowing contract verification to be integrated directly into CI/CD pipelines without custom scripting.
Works with popular testing frameworks like JUnit 4, JUnit 5, Spock, and Specs2, making it easy to adopt in existing project test suites.
Extends contract testing to message interactions via the V3+ specification, enabling reliable testing for event-driven architectures with tools like Kafka.
Multiple active branches (e.g., 4.7.x, 4.6.x) with different JDK and specification support create compatibility headaches and require careful version management, as shown in the complex version table.
Adopting consumer-driven contracts requires a significant shift in team mindset and workflow, which can be a barrier for organizations not prepared for this collaborative testing approach.
Documentation is spread across docs.pact.io, GitHub wikis, and Stack Overflow, making it difficult to find consistent, authoritative information without piecing together resources.