PactumJS
PactumJS is a free, open-source REST API automation testing tool for multiple levels of a software test pyramid.
What PactumJS is
PactumJS is a free, open-source REST API automation testing tool for multiple levels of a software test pyramid. It supports API, component, contract, integration and end-to-end testing, and can also run as a mock server for HTTP or HTTPS services. Tests construct HTTP requests and use assertions to validate responses from REST backends, regardless of the programming language used to build them. Integration tests can pass data between dependent API calls and save response values for later steps. Requests may be retried until a test passes or a stated condition is met; the documented default is one retry with a 1,000-millisecond polling interval. PactumJS is distributed through npm as the pactum package, with Node.js 10 or later listed for quick starts. It provides testing capabilities rather than a test runner, so it works alongside Mocha, Jest, Jasmine or Cucumber. The project includes data management for API tests and mock-server use, supports GraphQL and CI/CD integration, and uses the MIT License. Its cURL converter is beta or experimental, and some features may not work as expected.
Good
- Free and open source under MIT License
- Covers several test pyramid levels
- Runs as an HTTP or HTTPS mock server
- Works with common test runners
- Supports retries and reusable response data
Watch out
- Requires Node.js 10 or later
- Not a test runner itself
- cURL converter is beta or experimental
- Some converter features may not work as expected
Who it suits
It suits developers, QA engineers and SDETs writing readable API, contract, component or end-to-end tests. It is also useful when tests need mock HTTP services or backend-language independence.
Verdict
PactumJS offers broad API testing and mock-server capabilities while fitting into existing Node.js test-runner workflows. Users should account for its runtime requirement and the experimental status of the cURL converter.
Plans and prices
From PactumJS's own pricing page, checked 9 Oct 2026.
| Plan | Price | What it gives you |
|---|---|---|
| Free and open source | Free | REST API testing tool |
| PactumJS | Free | Free and open source · MIT License |
The facts
Each one read from PactumJS's own pages, with the date it was checked.
What it does
- Audience
- The site identifies developers, QA engineers, and SDETs as typical users.checked 9 Oct 2026
- Backend compatibility
- Tests can target backend servers regardless of the programming language used to build their APIs.checked 9 Oct 2026
- Backend coverage
- Tests can run against REST API servers regardless of the programming language used to build those servers.checked 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.checked 9 Oct 2026
- Data management
- The project describes its data management as an included feature for API tests and mock server use.checked 10 Oct 2026
- HTTP testing
- Its API testing features build HTTP requests and validate server responses with assertion functions.checked 9 Oct 2026
- Install
- The README gives npm install --save-dev pactum as an installation command.checked 10 Oct 2026
- Integration testing
- The integration testing guide describes passing data between dependent API calls and saving response data for reuse in tests.checked 9 Oct 2026
- Intended users
- Its typical users are developers, QA engineers, and SDETs.checked 10 Oct 2026
- License
- PactumJS is released under the MIT License.checked 10 Oct 2026
- Mock server
- PactumJS can act as a standalone mock server for HTTP-based APIs.checked 10 Oct 2026
- Purpose
- PactumJS is a free and open-source REST API automation testing tool for all levels of a test pyramid.checked 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.checked 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.checked 9 Oct 2026
- Support
- The project uses GitHub Discussions to receive feedback, discuss ideas, and answer questions.checked 10 Oct 2026
- Testing types
- It supports API, component, contract, integration, and end-to-end testing, as well as a mock server.checked 10 Oct 2026
- Test runners
- The project README shows using PactumJS with Mocha, Jest, or Cucumber as test runners.checked 10 Oct 2026
- Test style
- It provides a clear, simple API for writing readable and maintainable component, contract, and end-to-end integration tests.checked 10 Oct 2026
- Use cases
- It supports API, component, contract, integration, and end-to-end testing, as well as mock servers.checked 9 Oct 2026
Alternatives to PactumJS
- 1
HTTPie
Free planOpen sourceWebLinuxmacOSWindows8.3From $10 a month - 2

Karate
Free planOpen sourceAPIExtensionLinuxmacOS8.2From $100 a year - 3

SoapUI
Free planOpen sourceAPILinuxmacOSSelf-hosted8.2From $1,069 a year - 4

Bruno
Free planOpen sourceAPIExtensionLinuxmacOS8.1From $6 a month - 5

Apidog
Free planWebAPIExtensionLinux8.0From $9 a month - 6

PactFlow
Free planWebAPILinuxSelf-hosted7.6From $115.42 a month
