Questions tagged [mountebank]

Mountebank is the tool used for cross-platform, multi-protocol test doubles over the wire. Written in javascript, currently supporting http, https, smtp, tcp

Mountebank is the tool (https://github.com/bbyars/mountebank) used for cross-platform, multi-protocol test doubles over the wire. Written in javascript, currently supporting http, https, smtp, tcp

docs on http://www.mbtest.org/

50 questions
0
votes
1 answer

Mountebank imposter ports not accessible when mountebank started using dotnet-testcontainers

I am using dotnet-testcontainers https://github.com/HofmeisterAn/dotnet-testcontainers to spin up a container with mountebank in my xUnit test. I can successfully create a mountebank client and create an imposter successfully. The issue is that when…
rochitsen
  • 402
  • 6
  • 18
0
votes
1 answer

Unable to get a response from a container on the same network, Docker compose, Mountebank

I have a Go application and three docker containers for the app, database and mountebank to mock/stub HTTP response. I would like my mountebank container to return an appropriate response when the test_api (app container) makes a request. The…
Teriyaki Boy
  • 17
  • 1
  • 5
0
votes
1 answer

NPM command for mounteback with nodemon

I am using mountebank JS for my mocks and its been a pain to manually restart it. I have installed nodemon in my package.json and been able to run it but it does not restart when I edited and save the ejs files. This is the command I have that runs…
Carlos Jaime C. De Leon
  • 2,476
  • 2
  • 37
  • 53
0
votes
1 answer

Mountebank predicates doesn't check headers

I have below code and looks like it is not checking headers as a predicate. { "responses": [ { "inject": "<%- stringify(filename, 'Scripts/MyDept/CutOffTime.ejs') %>" } ], "predicates": [ { "matches": { …
Shabar
  • 2,617
  • 11
  • 57
  • 98
0
votes
1 answer

mountebank predicate proxy with CORS

I set up a mountebank predicate to proxy a downstream server. The response from the server does not have the Access-Control-Allow-Origin set to *. I can definitely record the responses from the downstream server and then spin up a new mountebank…
Ali Bhagat
  • 475
  • 1
  • 6
  • 15
0
votes
1 answer

Is it possible to alter the request body in mountebank before it gets processed ? If yes, then how can we do that?

I am working on service virtualization using mountebank. I am receiving the request from test application in mountebank which contains soap xml as a request body. In that soap xml, there is a tag wsa:Tohttp://[ip]:[port]/ but I need to…
Shivam
  • 35
  • 7
0
votes
1 answer

Dynamically change the saved response in mountebank imposter without hitting target app

I am using mountebank for service virtualisation in my performance test. So, first time when I hit the mountebank service url with request parameter e.g. flightNo=513, it goes to target application using proxyOnce mode and saves the response in…
Shivam
  • 35
  • 7
0
votes
1 answer

Is there way to pass path parameter in Mountbank

I was trying to pass path parameter using Mountebank. Below is working, but there path is static no any parameters. "predicates": [ { "equals": { "method": "GET", "path": "/accounts", …
Shabar
  • 2,617
  • 11
  • 57
  • 98
0
votes
1 answer

Mountebank using wrong predicate and ignoring the value in contains

I tried their documentation, but it's very "basic", so hope somebody here can spot my issue? I got 2 predicates, one with the wrong user, one with the right user. The user's base64 is sent via post-body, but it seems the contains of Mountebank is…
MushyPeas
  • 2,469
  • 2
  • 31
  • 48
0
votes
1 answer

Mountebank - How do I assert message body is JSON format in a POST request in mountebank

I want to stub and check the message body in POST request in mountebank, { "port": "22001", "protocol": "http", "name": "login_user", "stubs": [ { "responses": [ { "is": { "statusCode": 201, …
0
votes
1 answer

mountebank how to merge 2 imposter into one file

I have 2 applications, each uses the same mountebank (docker image). I maintained 2 separate "imposter" files because we run the application at a different machine. I wanted to run 2 applications at the same machine, maintain one mountebank docker…
user2201789
  • 1,083
  • 2
  • 20
  • 45
0
votes
2 answers

Analyse gzip request

I am exploring mountebank and have a case where I need to analyse the gziped json request in order to create a predicate that returns the appropriate response. Can I unzip a json request and analyse the json with mountebank?
jagdipa
  • 420
  • 1
  • 5
  • 18
0
votes
1 answer

How to call function from another js file in mountebank response block

I have a question regarding the decoration of response of mountebank. I failed to call a function from another js file in the response code block. Anyone could give me a hint? My js file: utils.js function getRandomCharAndNum(min, max){ let…
0
votes
1 answer

Use Mountebank copy behavior in multiple stubs

Is it possible to share a variable between Mountebank stubs? Here's a high level example: Stub A: { "predicates": [ { "matches": { "body": "amount=420" } } ], "responses": [ …
0
votes
1 answer

query parameter is not working in mountebank URL

I am facing issue while getting the response using the Query during the mocking data with Mountebank tool: Below is the link which I have tired: GET:http://localhost:6173/entities/?key=first I want to get the "second" response, but what I'm getting…