Pact JS vs Pact-JVM: open-source contract testing tools compared
Metrics as of , from the GitHub or GitLab API of each repository. Refreshed monthly.
Summary
Pact JS: Node.js library for Pact contract tests, with the PactV3 consumer API and Verifier class in the @pact-foundation/pact npm package.
Pact-JVM: JVM library for Pact contract tests with JUnit, Spring, Gradle and Maven support, covering specification V4.
Both are listed under Contract testing. The table gives repository metrics from the GitHub API with their fetch date, then the documented facts used for every comparison in this category, each linked to the README or docs page it comes from. A cell reads "not documented" when the fact was not found in the project's documentation; that does not mean the feature is absent.
Side by side
| Fact | Pact JS | Pact-JVM |
|---|---|---|
| Stars | 1,8151 | 1,1451 |
| Forks | 3571 | 4931 |
| Contributors | 1231 | 2521 |
| Last release | 2026-09-071 | 2026-08-101 |
| Last commit | 2026-09-221 | 2026-09-211 |
| Commits in 90 days | 1101 | 291 |
| License | MIT1 | Apache-2.01 |
| Primary language | TypeScript1 | Kotlin1 |
| Status | active1 | active1 |
| Languages for writing tests | JavaScript on Node.js (Node 16+ as of pact-js v12) source: README | JVM languages: Java, Groovy, Kotlin; Scala via pact4s; Clojure through the JUnit library source: README |
| Contract or spec formats | Pact specification versions 2, 3 and 4 (pact-js 10.x and later) source: README | Pact specification V4 with plugins (4.7.x branch) source: README |
| Protocols | HTTP/REST and event-driven systems source: README | HTTP; message queue interactions (V3 message pacts) source: README |
| CI integration | CI/CD workflows through Pact Broker source: README | Maven plugin links verification results to a CI build URL (pact.verifier.buildUrl) source: Docs: Maven plugin |
| Install method | npm (npm install --save-dev @pact-foundation/pact) source: README | Maven artefacts under au.com.dius.pact (for example au.com.dius.pact:consumer) source: README |
1 Fetched from the GitHub or GitLab API on . Hover a value for its own date.
When each fits
Written from each project's documented scope, not from preference. Neither tool is ranked.
Pact JS
Fits projects that write consumer-driven contract tests for APIs in JavaScript; its README describes a consumer test that produces a contract shared with the provider. source: README
Pact-JVM
Fits projects that run on the JVM and use consumer-driven contracts; its README describes consumer tests that generate Pact files used to verify service providers. source: README
More on these tools
Sources
- GitHub REST API: repository, read
- GitHub REST API: repository, read
- GitHub REST API: contributors, read
- GitHub REST API: contributors, read
- GitHub REST API: latest release, read
- GitHub REST API: latest release, read
- GitHub REST API: commits, read
- GitHub REST API: commits, read
- README, read
- README, read
- Docs: Maven plugin, read
Documented facts collected 2026-09-22. See the methodology for how metrics and facts are gathered.