mountebank - over the wire test doubles

Fork me on GitHub

the apothecary


mountebank knows an example is worth a thousand words, which is why he has catalogued examples here for your viewing pleasure. If you have an example you'd like to add to the gallery, please contact mountebank, either through the support mailing list or mountebank's personal email address listed on the github page, or submit a pull request which mountebank will happily accept.

F# - mocking SMTP
Nikos Baxevanis shows how to verify SMTP calls from the system under test using F#. The gist shows the code.
F# - stubbing HTTP
Nikos Baxevanis continues his F# series by stubbing HTTP using mountebank. In a neat trick, he shows how to extract the setup and teardown in an Interceptor. Once again, he makes the code available in a gist.
Java - stubbing binary serialized objects over TCP
mountebank himself shows an example of stubbing binary Java object graphs over TCP, in a modified version of the code from the project that inspired the creation of the tool.
.NET - proxying .NET remoting over TCP
mountebank shows a simple example of record-replay proxying with .NET remoting.
A mock server powered by mountebank and Docker
An example that builds a Docker container hosting mountebank.
A Java example for testing SMTP
Javier T. Garcia Ortiz wrote a fully-functional example detailing the code and maven build steps to get this working in Java. mountebank admits he had to use his browser's Translate functionality to read it.
A Go preprocessor
An example Go preprocessor to a mountebank request
mountebank and gradle
An example showing starting mountebank from inside gradle
mountebank and Powershell
An example showing installing and starting mountebank from within Powershell
Testing a Mule ESB with Docker and mountebank
Conrad Pöpke describes using a Docker container running mountebank to stub a Mule ESB
Mocking downstream services with mountebank
Tomasz Podolak shows a fully worked out example using mountebank in C#

Microservices testing references mentioning mountebank

The microservices book
Sam Newman's book is the canonical reference on the subject.
Using mountebank to detach frontend and backend development
The inimitable Paul Hammant describes how his teams use mountebank to allow front-end and back-end teams to develop in isolation.
Testing Strategies in a Microservice Architecture
Toby Clemson's infodeck around testing strategies
Service Virtualization Strategy (Sandboxing) for Microservices
Venkat Rangasamy writes about service virtualization, including mountebank, for DZone
mountebank and you
Nagesh Kumar, who was the QA on the first team to use mountebank, provides a deck giving an overview of the tool