0

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 NOT called but it goes into mock server and return the faked data. I know currently there is no mock in developers' code. I want to configure a mock server which will intercept the requests and actually return some predefined data.

Is there any suggestions or any mature open source mock server for this scenario and where should the mock server be configured?

Eason
  • 1
  • 1

1 Answers1

0

When MockServer receives a request it matches the request against active expectations that have been configured, if no matches are found it proxies the request if appropriate otherwise a 404 is returned.

An expectation defines the action that is taken, for example, a response could be returned.

1-return a "mock" response when a request matches an expectation

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

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

4-return an invalid response or close the connection when a request matches an expectation

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

6-retrieve logs, requests or expectations to help debug

https://www.mock-server.com/

Amari
  • 1
  • 2