Freedom251 › API Testing Tools
PactumJS

What PactumJS is
PactumJS is a free, open-source tool for automating REST API tests across several levels of a test pyramid. It supports API, component, contract, integration, and end-to-end testing, and can run as a mock server for HTTP or HTTPS services. Tests build HTTP requests and use assertions to check server responses, and can target REST backends written in any programming language. For integration tests, dependent calls can pass data between one another and save response values for reuse. Requests can be retried until a test passes or a specified condition is met; the default is one retry with a 1,000-millisecond polling interval. PactumJS is a Node.js project distributed through npm as the pactum package, with Node.js 10 and above listed as a requirement. It provides testing capabilities rather than a test runner, and is designed to work alongside Mocha, Jest, Jasmine, or Cucumber. The project uses the MIT License, and its documentation points users to GitHub Discussions for feedback and questions. The cURL-to-PactumJS converter is marked beta or experimental, with a caution that not all features may work as expected.
Who it suits
PactumJS is for developers, QA engineers, and SDETs who need API or integration testing capabilities. It is designed to accompany a test runner rather than replace one.
What it does well
- Supports API, component, contract, integration, and end-to-end tests
- Can run as an HTTP or HTTPS mock server
- Works with REST backends built in any programming language
- Free and open source under the MIT License
What to know first
- Requires Node.js 10 or above
- Does not provide its own test runner
- The cURL converter is beta or experimental
Limits
PactumJS is free and open source. The cURL-to-PactumJS converter is experimental, and its documentation cautions that some features may not work as expected.
Plans
| Plan | Billed and limits | Price |
|---|---|---|
| Free and open source | REST API testing tool | Free |
| PactumJS | Free and open source · MIT License | Free |
As pactumjs.github.io lists them, read 9 Oct 2026. The maker's own page has the final word.
Getting started
- Open the PactumJS website
- Install the pactum package with npm install --save-dev pactum
- Use Node.js 10 or newer
- Add PactumJS alongside Mocha, Jest, Jasmine, or Cucumber
- Write HTTP requests and response assertions
- Configure mock-server or integration scenarios as needed
Verdict
PactumJS covers several API testing layers and can also serve as a mock server, while fitting into existing test-runner workflows. Its free, open-source distribution may suit teams comfortable with Node.js.
Questions
Is PactumJS free?
Yes. PactumJS is free, open source, and released under the MIT License.
Which platforms does PactumJS support?
It is a Node.js project distributed through npm as the pactum package. The quick-start requirements list Node.js 10 and above.
Does PactumJS include a test runner?
No. It is designed to work with runners such as Mocha, Jest, Jasmine, or Cucumber.
What testing types does it support?
It supports API, component, contract, integration, and end-to-end testing, plus mock-server use.
Can it test different backend languages?
Yes. Tests can target REST API servers regardless of the programming language used to build them.
Does PactumJS support GraphQL and CI/CD?
GraphQL support and CI/CD integration are listed features.
Facts from PactumJS's own pages
- Audience
- The site identifies developers, QA engineers, and SDETs as typical users. · pactumjs.github.io, 9 Oct 2026
- Backend compatibility
- Tests can target backend servers regardless of the programming language used to build their APIs. · pactumjs.github.io, 9 Oct 2026
- Backend coverage
- Tests can run against REST API servers regardless of the programming language used to build those servers. · pactumjs.github.io, 10 Oct 2026
- Converter limitation
- The cURL-to-PactumJS converter is marked beta or experimental, and the site cautions that not all features may work as expected. · pactumjs.github.io, 9 Oct 2026
- Data management
- The project describes its data management as an included feature for API tests and mock server use. · github.com, 10 Oct 2026
- HTTP testing
- Its API testing features build HTTP requests and validate server responses with assertion functions. · pactumjs.github.io, 9 Oct 2026
- Install
- The README gives npm install --save-dev pactum as an installation command. · github.com, 10 Oct 2026
- Integration testing
- The integration testing guide describes passing data between dependent API calls and saving response data for reuse in tests. · pactumjs.github.io, 9 Oct 2026
- Intended users
- Its typical users are developers, QA engineers, and SDETs. · pactumjs.github.io, 10 Oct 2026
- License
- PactumJS is released under the MIT License. · pactumjs.github.io, 10 Oct 2026
- Mock server
- PactumJS can act as a standalone mock server for HTTP-based APIs. · github.com, 10 Oct 2026
- Purpose
- PactumJS is a free and open-source REST API automation testing tool for all levels of a test pyramid. · pactumjs.github.io, 10 Oct 2026
- Retry behavior
- The integration testing guide says requests can be retried until a test passes or a specified condition is met, with a default maximum of one retry and a 1,000-millisecond polling interval. · pactumjs.github.io, 9 Oct 2026
- Runtime and installation
- PactumJS is a Node.js project distributed as the npm package pactum, and its quick-start page lists Node.js 10 and above as a system requirement. · pactumjs.github.io, 9 Oct 2026
- Support
- The project uses GitHub Discussions to receive feedback, discuss ideas, and answer questions. · pactumjs.github.io, 10 Oct 2026
- Testing types
- It supports API, component, contract, integration, and end-to-end testing, as well as a mock server. · pactumjs.github.io, 10 Oct 2026
- Test runners
- The project README shows using PactumJS with Mocha, Jest, or Cucumber as test runners. · github.com, 10 Oct 2026
- Test style
- It provides a clear, simple API for writing readable and maintainable component, contract, and end-to-end integration tests. · pactumjs.github.io, 10 Oct 2026
- Use cases
- It supports API, component, contract, integration, and end-to-end testing, as well as mock servers. · pactumjs.github.io, 9 Oct 2026
Where PactumJS stands on Freedom251
- API Testing Tools#24 of 34