CheckOps home

Tools directory

M

CheckOps

Mockttp

Mockttp is an Apache-2.0 JavaScript library from HTTP Toolkit for intercepting, transforming and testing HTTP(S) requests and responses with a real proxy, in Node.js and browsers.

Visit website

Latest public signals

Not refreshed yet. Refresh reads the public site and, when the entry has a GitHub repository, the latest release.

Visit Website

Introduction

Mockttp lets you intercept, transform or test HTTP requests and responses in JavaScript. It powers HTTP Toolkit and can be used for integration testing or to build custom proxies.

The README contrasts it with in-process stubbing: many tools stub HTTP functions inside one JavaScript process, which ties you to an environment and does not test the real requests your code sends. Mockttp runs a real HTTP(S) server and proxy, so it can mock requests from any process, browser or language, and it works in Node.js and in browser tests.

Tests start a mock server, define rules such as forGet('/users').thenReply(200, ...), run the code, and then check which requests were seen. HTTPS interception with generated certificates is built in.

In the quality loop it supports integration and end-to-end tests that need realistic HTTP mocking.

Features

  1. Real proxy: Mocks requests from any process.
  2. Rules API: Match and respond, forward, or transform.
  3. HTTPS support: Generated CA and certificates.
  4. Request assertions: Inspect seen requests.
  5. Browser and Node: Use in both environments.

Pros

  1. Realistic: Tests real network calls rather than stubs.

Cons

  1. JavaScript API: Mocks are defined in JS/TS.
  2. Proxy setup: Clients must be configured to use the proxy.
const mockttp = require('mockttp');
const server = mockttp.getLocal();
await server.start(8080);
await server.forGet('/users/1').thenReply(200, JSON.stringify({ id: 1 }));

Resources:

Pricing

See site.

  1. JavaScript teams needing real HTTP mocking across processes.
  2. Not a fit for simple in-process mocks; MSW or nock are lighter.

Conclusion

Mockttp is a powerful, maintained library for realistic HTTP mocking and interception.

On CheckOps, Mockttp is filed under the Integration testing and API & contract testing stages. Related tools listed here include Mock Service Worker (MSW), Nock, WireMock, MockServer, HTTP Toolkit and MirageJS. Before choosing, compare them on licence, supported languages and platforms, hosting model, and how well each fits your existing CI pipeline. Facts on this page were checked against the official website, documentation and repository on 11 November 2026; statements the vendor makes about its own product are marked as vendor claims.

Alternatives

Other tools on CheckOps that cover similar ground. Open a page, or compare one with Mockttp side by side.