mountebank - over the wire test doubles

Fork me on GitHub

the apothecary


mountebank exposes a considerable amount of power with only a few concepts, but knowing what those concepts represent can greatly help in learning how to use the tool.

A server representing a test double. An imposter is identified by a port and a protocol. mountebank is non-modal and can create as many imposters as your test requires.
A set of configuration used to generate a response for an imposter. An imposter can have 0 or more stubs, each of which are associated with different predicates.
A condition that determines whether a given stub is responsible for responding. Each stub can have 0 or more predicates.
The configuration that generates the response for a stub. Each stub can have 0 or more responses.
response type
Defines the specific type of configuration used to generate a response. The simplest type is called is, and allows you to define the imposter's response directly. mountebank also supports a proxy response type, which allows record-replay behavior, and an inject response type, which allows you to script mountebank responses. Each response has exactly one response type.
stub behavior
Adds additional cross-cutting behavior to a response, for example by adding latency to the response or augmenting the response with more information. A response can have zero or more behaviors, but only one of each type of behavior.