Dawki River-Meghalaya

Virtual Service creation from Scratch-MounteBank Part-01

Install MountrBank

First of all, you will need to install Node.js to use mountebank. After installation is complete, run the following command:

$ npm install -g mountebank

Then run:

$ mb
MB is running

Creating Your First Imposters and Stubs-HelloWorld. Bellow is the sample imposter. The imposter is the most integral part of a mountebank. An imposter is associated with a port number and a protocol. It contains within itself the response we want to return and other related information.

Open another terminal, just run the above code as follow.

Configuring the first imposter

Now on the terminal where mb is running, you can see an imposter is created and waiting at port 3000.

Imposter is created

Hitting at the port 3000, respond you “Hello World”

Hello World Response

As always, if you get stuck, ask for help.

Similarly, if you are looking to create XPath, Script, and Analysis of the existing automation scripts instantly you can use the web extension tool TruePath.

About author Sumit: QA for 15 years and passionate about Test Automation, Service Virtualization, Web service, DevOps & ETL-BI Testing. Currently working for a leading telecom company CenturyLink as an offshore Automation COE lead. Please connect with him on LinkedIn.

--

--

--

Test Automation Enthusiastic.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

How to make function parameters optional in TypeScript

In this Article we cover what is Virtual DOM and How it works internally.

Create a Tweet with Node.js

Illustration of a woman sitting at her computer while writing

10 React Interview Questions for 2020

Introducing StateAdapt: reusable, reactive state management

What Is “this” In Javascript?

Create Sitecore JSS App using React JS

Filtering With Multiple Criteria — React

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Timus

Timus

Test Automation Enthusiastic.

More from Medium

CodeLab Website

Amazon Virtual Private Cloud (VPC)

Smarsh to Support Consumer Messaging Apps: Here’s Why It Matters for RIAs and BDs

Knowing When to Stop Is Part of the Victory