- Home
- API Testing Tools
- PactumJS
PactumJS
What it 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 also operate as a mock server for HTTP or HTTPS services. Tests create HTTP requests and use assertions to validate server responses; target REST APIs can be built in any programming language. For integration tests, dependent API calls can pass data between them and retain response data for reuse. Requests can retry 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 is distributed through npm as the `pactum` package and requires Node.js 10 or above according to its quick-start page. It provides test capabilities rather than a test runner, and is intended to work with runners such as Mocha, Jest, Jasmine, or Cucumber. The project uses the MIT License; documentation directs users to GitHub Discussions for feedback and questions.
For and against
For
- Covers API, component, contract, integration, and end-to-end testing.
- Can serve as an HTTP or HTTPS mock server.
- Tests REST APIs regardless of backend programming language.
- Free and open source under the MIT License.
Against
- Requires Node.js 10 or above.
- Does not provide its own test runner.
- The cURL converter is experimental and may not work fully.
The verdict
PactumJS brings API testing and mock-server capabilities to Node.js projects, with support for several test layers. Users need to pair it with a test runner, and the cURL converter remains experimental.
Who it suits
PactumJS is suited to developers, QA engineers, and SDETs building or checking REST APIs. It fits teams who already use a supported test runner or want mock-server capabilities.
Plans and prices
PactumJS
Free and open source · MIT License
Read 10 Oct 2026 · pactumjs.github.io
Free and open source
REST API testing tool
Read 9 Oct 2026 · pactumjs.github.io
On the record
- Audience
- The site identifies developers, QA engineers, and SDETs as typical users.pactumjs.github.io · read 9 Oct 2026
- Backend compatibility
- Tests can target backend servers regardless of the programming language used to build their APIs.pactumjs.github.io · read 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 · read 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 · read 9 Oct 2026
- Data management
- The project describes its data management as an included feature for API tests and mock server use.github.com · read 10 Oct 2026
- HTTP testing
- Its API testing features build HTTP requests and validate server responses with assertion functions.pactumjs.github.io · read 9 Oct 2026
- Install
- The README gives npm install --save-dev pactum as an installation command.github.com · read 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 · read 9 Oct 2026
- Intended users
- Its typical users are developers, QA engineers, and SDETs.pactumjs.github.io · read 10 Oct 2026
- License
- PactumJS is released under the MIT License.pactumjs.github.io · read 10 Oct 2026
- Mock server
- PactumJS can act as a standalone mock server for HTTP-based APIs.github.com · read 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 · read 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 · read 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 · read 9 Oct 2026
- Support
- The project uses GitHub Discussions to receive feedback, discuss ideas, and answer questions.pactumjs.github.io · read 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 · read 10 Oct 2026
- Test runners
- The project README shows using PactumJS with Mocha, Jest, or Cucumber as test runners.github.com · read 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 · read 10 Oct 2026