mountebank Multi-protocol network test doubles using JSON imposters, predicates and controlled responses.
Overview mountebank is an MIT-licensed service-virtualization tool that exposes configurable test doubles over network protocols. Its imposters can return controlled responses, match requests and support proxy-based recording, with additional protocols available through community extensions.[2] [3]
Contents Network-facing test doubles An imposter is a simulated service listening on its own port, separate from mountebank's administration port. Tests create imposters through a JSON API and define stubs with predicates and responses. Without predicates, a stub matches broadly; adding conditions narrows which interaction receives the configured response. This model lets applications connect to a substitute endpoint without requiring the application's implementation language to match the mocking tool.[3]
Built-in and extended coverage The documentation identifies HTTP, HTTPS, TCP and SMTP as built-in protocols. The repository lists further protocols implemented either directly or through community extensions, so that list should not be read as uniform support in the base installation. Binary TCP responses can be represented using encoded data, which is useful for testing a network dependency whose wire format is not HTTP.[2] [3]
Custom behavior and execution risk JavaScript injection supports cases beyond built-in predicates and responses, but is disabled unless explicitly enabled. Injected functions have access to the Node.js runtime and are not validated during stub creation; faulty code can crash the process. The project recommends restricting network access when injection is enabled. This is executable customization, not a sandbox for accepting arbitrary mock definitions from untrusted users.[4] [5]
Licensing and project transition mountebank uses the MIT license. The current repository has moved to the mountebank-testing organization and its README describes a transition to collaborative maintenance, including CI/CD migration. It cautions that merging contributions depends on completing that infrastructure work. That notice is a maintenance consideration rather than proof that the software has been discontinued, and release expectations should be checked before depending on a pending fix.[1] [2]
Substitution scope mountebank can substitute for WireMock for externally hosted HTTP test doubles when its JSON imposter model fits the suite, while built-in TCP and SMTP support may broaden a mixed-protocol test setup. This does not establish compatibility with WireMock mappings or equal support across extensions. Migrating tests requires reviewing predicate semantics, response sequences and whether custom behavior introduces executable-code privileges.[3] [4] [6]
Also included: 3 capabilities and 0 substitute relationships. Check substitutes in section 1 and capabilities in section 3.