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
3
votes
2 answers

Permission issues when deploying docker image in OpenShift/Minishift

This question relates to the local version of OpenShift, Minishift. I am runnning on MacOS. I am attempting to deploy an application called Mountebank from docker hub, here is the source: https://hub.docker.com/r/andyrbell/mountebank/ The DockerFile…
Talisker
  • 177
  • 2
  • 16
3
votes
1 answer

How to record request and reponse using a proxy in Mountebank?

I am creating an imposter process using Mountebank and want to record the request and response. To create a http imposter I used the following CURL command as described in their documentation. curl -i -X POST -H 'Content-Type: application/json'…
python
  • 4,403
  • 13
  • 56
  • 103
2
votes
0 answers

MbTest(MounteBank) vs WireMock vs Mock-server vs anyother for encrypted payload

we need to decide a mock-server for our applications. We have an ask in which the applications sends encrypted payload in request and response . that encryption is using rsa so the encrypted string changes for same payload so it is not possible to…
2
votes
1 answer

Java script regex to accept multiple values including empty in Mountebank predicates

I was trying to accept multiple values including empty in Mountebank predicates. As per below in the query parameter I want to accept both false and empty value. Tried below and it doesn't accept neither isValid=false nor isValid= "predicates":[ …
Shabar
  • 2,617
  • 11
  • 57
  • 98
2
votes
1 answer

MbDotNet Mountebank .Net client throws No connection could be made because the target machine actively refused it

Trying to use the Mountebank .Net Client for the test project _mbClient = new MountebankClient(); _mbClient.DeleteAllImposters(); HttpRequestException: No connection could be made because the target machine actively refused it
Franva
  • 6,565
  • 23
  • 79
  • 144
2
votes
1 answer

Why does Mountebank predicate cause 200 instead of 500 in response?

Teaching self mountebank. I want to create a mock endpoint such that by issuing POST command to http://localhost:2525/test?mock-response-code=500, the response code will be 500 and the message body will be some custom text. When I create the…
Guy
  • 666
  • 1
  • 10
  • 34
2
votes
1 answer

how to get value from param URL mountebank?

I have tried use inject to get param URL request like below http://api.com?param1=test¶m2=test2 I try to get param2 value : var full_url = request.path; var param2 = full_url.searchParams.get('param2'); but i can't get fullpath of URL i got…
Sidara KEO
  • 1,693
  • 1
  • 14
  • 34
2
votes
0 answers

Mocking HTTPS request using mountebank

Hi I have created one HTTPS service using mountebank tool - however I am getting "Socket Hang Up " error during impostor creation. Below are the steps followed Added the CA authorized certificate in postman tool under 'Settings under that…
Ramu
  • 21
  • 2
2
votes
1 answer

Setting up query parameters for mountebank testing

I want to set-up mountebank for the end-point /trends?param1=PT-31. Following is the way, I am setting up the predicates in the imposter. However, there does not seem to be a match and I do not get a response. What am I missing? …
cogitoergosum
  • 2,309
  • 4
  • 38
  • 62
2
votes
1 answer

Error while trying to run mountebank

Getting the below error when try to run/start mountebank using the imposter file. Installed package versions, npm : 5.6.0 node : 8.10.0 mountebank : 1.14.0 Command use to start mountebank: mb --configfile imposter.ejs --allowInjection
Vishwa G
  • 573
  • 1
  • 6
  • 13
1
vote
0 answers

Can not run the MounteBank first example

I tried to run the first example of MounteBank documentation but it fail. I followed the initial setup: imposters.ejs { "imposters": [ <% include originServer.ejs %>, <% include proxyServer.ejs %> ] } And after I ran: mb --configfile…
1
vote
0 answers

mountebank : no predicate match for a contains block

Hello i am completely new to mountebank I am trying write a stub with predicate for the following json blob { "query": { "response_type": "code", "state":…
Krishna
  • 186
  • 2
  • 9
1
vote
2 answers

Call another function within same EJS file

I was trying to call another function which is in same ejs file. async function (request, state, logger) { var fs = require('fs'); var path = require('path'); var util = require('util'); var response; var RspFilename =…
Shabar
  • 2,617
  • 11
  • 57
  • 98
1
vote
0 answers

Can mountebank be used to mock a GET octet-stream image file using stub and predicate?

When using a text file, this works like a regular GET { "responses": [ { "is": { "headers": { "content-disposition": "attachment; filename=sample_text_file.txt" }, "statusCode": 200, "body": …
ravikant
  • 415
  • 1
  • 5
  • 13
1
vote
1 answer

Mountebank piping video file stream to response not working

I am trying to get Mountebank to return the read in file stream pipe from my .ts MPEG-2 file to the Mountebank injection so the client can receive the stream data and play the video. There is a useful Node implementation on how to read in the files…
lion_bash
  • 1,309
  • 3
  • 15
  • 27
1
2 3 4