Mountebank

github.com ↗

An open-source service-virtualization tool for replacing network dependencies with configurable test doubles.

SI Score
75/100
Pricing
Open Source AI reading, not confirmed
Free plan
Not confirmed
Sign-up required
Not confirmed

Ask SI about Mountebank

Answers use saved listing facts and recorded sources.
Homepage screenshot
Screenshot of the Mountebank homepage

What it does

Mountebank creates over-the-wire test doubles, called imposters, so an application can be tested against simulated services instead of a live dependency. Its repository describes stubbing with predicates, mock verification, JavaScript injection and record-playback through proxying. HTTP, HTTPS and TCP are among the listed protocols; other protocols may be implemented by the project or a community extension. It runs as a local Node.js service that a test client can call, making it useful for integration and contract-oriented testing where dependencies are unreliable or costly to invoke.

Replace a dependency at the network boundary

Mountebank is a service virtualization server, not a test runner. Install the npm package, start the mb process, then configure an imposter that matches the protocol and request patterns your application uses. Your application or integration test points at that test double; configured predicates can distinguish requests and stubs can return the chosen responses. The project also documents mock verification, JavaScript injection and recording or replaying traffic through a proxy. This lets a test exercise client behavior without depending on a live third-party service.

The repository lists HTTP, HTTPS and text or binary TCP, as well as SMTP, LDAP, gRPC, WebSockets, GraphQL, SNMP, Telnet, SSH and NETCONF. It explicitly notes that some protocol implementations may be community extensions, so verify the implementation and maturity of the protocol you need. The project uses Node.js and npm, and the README says its local documentation is available after starting the service.

There are two cautions before adopting it. First, the current repository README says the project is transitioning to a collaborative organization and does not expect pull requests to be merged until CI/CD infrastructure is running; teams depending on upstream fixes should weigh that status. Second, the former mbtest.org site currently returned unrelated casino promotion content during this research. The official GitHub organization repository remains accessible and is used as this listing's primary source.

Strengths

  • Imposters can model request matching, stubs and verification at the network boundary rather than requiring a real dependency.
  • The repository documents record-playback, JavaScript injection and a broad protocol set, with some protocols supplied by community extensions.
  • The package can run as a local Node.js service that a test client targets.

Watch out for

  • The tool requires a Node.js/npm installation and configuration of the test doubles; it does not replace the test runner or create tests automatically.
  • The repository README says project contributions are in transition and should not be expected to merge until CI/CD migration is complete.

Best for

  • Integration tests that need predictable responses from HTTP, HTTPS or TCP dependencies.
  • Teams recording and replaying service interactions or validating client behavior with stubs and predicates.
  • Developers who need a local service-virtualization process instead of a live external dependency.

Sources