Questions tagged [mockserver]

What is MockServer

MockServer can be used for mocking any system you integrate with via HTTP or HTTPS (i.e. services, web sites, etc).

MockServer can:

  • return a "mock" response when a request matches an expectation

  • forward a request when the request matches an expectation (i.e. a dynamic port forwarding proxy)

  • execute a callback when a request matches an expectation, allowing the response to be created dynamically

  • verify requests have been sent (i.e. as a test assertion)

What is MockServer Proxy

MockServer Proxy can be used for transparently recording all requests sent by a system (i.e. an application or set of applications).

MockServer Proxy can:

  • proxy all requests using any of the following proxying methods:

    • Port Forwarding
    • Web Proxying (i.e. HTTP proxy)
    • HTTPS Tunneling Proxying (using HTTP CONNECT)
    • SOCKS Proxying (i.e. dynamic port forwarding)
  • verify requests have been sent (i.e. in a test assertion)
  • record requests and responses to analyse how a system behaves
175 questions
0
votes
0 answers

How to create a mock WCF service in Visual Studio 2017

I have a decompiled client that calls a web service, the only configuration parameter is the endpoint url the rest is all in the service class. I wanted to simulate the service that calls starting from his wsdl I managed to do it with a visual…
Angelo
  • 101
  • 1
  • 9
0
votes
2 answers

UI5 Image need different paths for source when using mockserver

I'm currently implementing a mockserver for my UI5 Application. Everything works fine, which means my ui5 controls get the mocked data correctly. The only thing I’m still struggling with are source paths of images. Here an example: Within an XML…
MMöller
  • 1
  • 1
0
votes
2 answers

BrowserStack e2e tests with mock server

My goal is to set up an environment where CircleCI would run my e2e tests on BrowserStack in different browsers. My tests are assuming that there is a mock server running. (E.g. tests are checking whether a certain call to the mock server has been…
0
votes
1 answer

SAPUI5 mock server doesn't receive requests

I didn't find a solution for this problem. I'm currently working with the CRUD Master-Detail Application WebIDE template and added some custom functions with OData calls. When running the app with mock server it loads the mock data. So far so good.…
0
votes
1 answer

Redirect url in mockserver

I have a route in mock-server like this: http://localhost:1337/mock-store/admin/store-parameters/1 which returns back a json: { "id": 1, "code": "123", "redirect": true } I want that if the json includes "redirect = true", the route will…
Loren
  • 95
  • 10
0
votes
1 answer

how to exclude value when certain property not exist in loopback

I'm getting below response from loopback when I filter with below api: http://localhost:8001/myloopback/productDetails?q=product.productId==apple I want to exclude the data which doesn't have property "productModel" - how can we achieve this in…
learn groovy
  • 487
  • 4
  • 11
  • 28
0
votes
1 answer

Java regex URL for MockServer expectation

I'm trying to set up some expectations in MockServer where I have a specific expectation for requests matching this path /api/users/:user_id using the regex /api/users/.*. However, I have a few other expectations which I want to match when accessing…
Sasha Fonseca
  • 2,257
  • 23
  • 41
0
votes
1 answer

Unable to parse expectation on mockserver-netty when adding Content-Type header

I have an integration test where I am using mockserver-netty (v5.3.0) with a springboot 2.0 application..everything is working fine but if I try to add the Content-Type header, I get the following exception: java.lang.IllegalArgumentException:…
filmac
  • 177
  • 2
  • 15
0
votes
1 answer

How to set up mock server from the aspect of QA engineer

Here is the scenario: I'm a QA engineer and our product is web-based. We have some automation scripts to test websites and they will interact with the backend APIs. We want when some actions in the website invoke some backend APIs, the real API are…
Eason
  • 1
  • 1
0
votes
0 answers

mock-server and OpenSSL: Unable to load the library 'netty_tcnative_windows_x86_64'

To test a clients HTTP(S) communication I am using "mock-server". Currently I want to test a TLS connect but get the following error: i.n.u.internal.NativeLibraryLoader - -Dio.netty.native.workdir: C:\Users\xxx\AppData\Local\Temp…
Chriss
  • 5,157
  • 7
  • 41
  • 75
0
votes
1 answer

How to make Netty listen on all interfaces via System property?

I am using https://github.com/DiUS/pact-jvm/tree/master/pact-jvm-consumer-junit, which uses MockServer, which uses Netty. The launched Netty listens on loopback only (netstat -tulpn output:) tcp 0 0 127.0.0.1:21221 0.0.0.0:* LISTEN 27681/java , but…
Markus Schulte
  • 4,171
  • 3
  • 47
  • 58
0
votes
1 answer

MockServer in org.specs2 tests

I use playframework 2.2.6 scala. I want to write integration tests for my application. But my application requests some service by http and I want to mock it with mockServer. But I don't know when to start and stop mockServer cause tests use…
Artem
  • 505
  • 5
  • 22
0
votes
0 answers

Espresso mockWebServer response does not intercept http calls

I am trying to intercept the network calls made in my espresso test so that I can override the response with the local copy and make the tests more deterministic .The problem I am facing is even though I setup the MockWebServer correctly I never see…
luckysing_noobster
  • 1,933
  • 5
  • 24
  • 50
0
votes
1 answer

SAPUI5 mock server

I have trouble getting the mock server to work. I have set up everything according to the SAPUI5 guide provided here, but when I launch the application using mock server ("/test/mockServer.html") it gives me error in console: Uncaught (in promise)…
niceman
  • 251
  • 3
  • 16
0
votes
1 answer

Mock server response

I have a web app that allows clients to log in using social providers (Google / Facebook). I would like to write integration tests that check my implementation in the case of a successful / unsuccessful response from the provider. For that, I need…
pixie
  • 507
  • 9
  • 21
1 2 3
11
12