“New way to thinking about test doubles”
MOUNTEBANK
WHO AM I?
● 15 years in IT
● Development & QA
● Principal QA Engineer
1. MOUNTEBANK
a. What’s?
b. Why?
c. How it works?
1. UI INTEGRATION
2. HANDS-ON
3. NEXT STEPS
4. REFERENCES
5. Q&A
WHAT’S?
● Open Source
● Mocks, Stubs and Virtualized Services
○ Cross-Platform
○ Multi-Protocol
● API
● Behaviour Injection
● Node JS
WHY?
● Easy to install - npm i mountebank
● Without any platform dependencies
● Comprehensive documentation
● Native language bindings
● Users Journey
● Proxy
MOUNTEBANK API
PROXY MODES
● ProxyAlways
● ProxyTransparent
● ProxyOnce
PREDICATES
RESPONSES
HOW IT WORKS?
Mountebank runs on default port 2525 and offers the ability to create
imposters within it in other ports.
Each imposter can have many stubs and allows inject behaviour to
maintain and control state between them. Furthermore, it is possible to use
mountebank proxy to redirect calls to real or mocked environment.
UI INTEGRATION
This project is focused on integration between user
interface and stubs created in mountebank, so it
has the following project structure.:
● Mountebank image used in a docker
container
● Docker Compose to up project with
imposters
● HTML files to represents ecommerce web
● JS files (using fetch API) to call endpoints in
mountebank
● EJS file to create all stubs
● A service that simulates the query many
times to obtains the sales state.
CAPTION / SOURCES
USER FLOW
In the user flow, there are six pages each on with one stub in
mountebank and when these stubs are called the state of the
stub created in mountebank is changed.
LOGIN.HTML
AUTHORIZED
SHOP.HTML
LOGGED
PRODUCT_DETAILS.HTML
SELECTED
CART.HTML
ADDED
CHECKOUT.HTML
AT_CHECKOUT
PAYMENT.HTML
PAID
DEMO
DEMOS
Proxy Mode Repeat Inject
Behaviour
REFERENCES
Official Website http://www.mbtest.org/
Book
https://www.manning.com/books/testing-microservices-with-m
ountebank?utm_source=mb&utm_medium=affiliate&utm_camp
aign=book_byars_testing_12_20_18&a_aid=mb&a_bid=ee3288
f4
Mountebank UI http://donhenton.github.io/mountebank-UI/public_html/index.ht
ml#/
Disguise
http://donhenton.github.io/mountebank-UI/public_html/index.ht
ml#/
Google Groups https://groups.google.com/g/mountebank-discuss?pli=1
Q&A
Linkedin (André Diegues Rodrigues).:
https://www.linkedin.com/in/andr%C3%A9-diegues-rodrigues-64b6697a/
Email.:
andrevinicius.rodrigues@farfetch.com andrevdrodrigues@gmail.com
Thanks a Lot ;)

Using Mountebank to inject behavior into test stubs