Mock Talk! Which tool do you use for mocking API's?

Hello everyone!

While there are some threads here and there on the forum discussing some points about api mock tools, I haven’t been able to understand why or how people choose one tool over the other.

Hence, I created this thread in an attempt to gather and combine everyones thoughts and experiences with the various tools in the market, while also asking to share their use cases and how were they able to utilise the specific tool under question.

To add a bit of context - I am preparing a POC presentation about mock tools in our company to possibly identify whether or not we should switch to a new mocking tool or stay with the one currently in use (WireMock).

Based on my research, quantifying the general interest of QA folk and testers it came down to several tools that are most widely used in the market:

  • WireMock
  • Postman Mock Server
  • Beeceptor
  • Mountebank
  • MockServer
  • and the rest.

When thinking about comparing mocking tools in a company scope, I also tried to come up with the some criteria by which one could compare one tool to the other:

  • Ease of use / setup process
  • Range of capabilities and how complex can it be to utilise most of what the tool can offer
  • Pricing (I would assume that most on the list are open source. However, tools as postman do require you to purchase a package to use some of the advanced features - postman mock server in our case - which can get quite pricey!)
  • Security (This, on part, depends on how/where the tool runs. In most cases, the tools can be server-hosted locally, eliminating the risk of information leakage as the sensitive data is cycling only within the company. However, if we look at Beeceptor, which is cloud-based on the vendor side, we do encounter some risks related to PII and other sensitive info going out of the company’s circle, which could pose certain security risks)

These are the criteria that I came up with when thinking about factors that could impact stakeholders decision on which tool to use. Feel free to add anything that could’ve gone under my radar.

Also, I would be glad if you guys shared your experience with the listed tools!

  • Which one have you been using?
  • Why do you keep using it?
  • What are your use cases for mocking?
  • Add anything else to the discussion you think would be beneficial!
4 Likes

MITMProxy. My goal was to find something flexible which didnt make technology assumptions about the rest of the stack (like wiremock does).

One use case Im particularly interested in is recording/playback with variations. I find that it’s quite a common use case for an API call request and response to be extremely fat and there will be a few things in there which will make the request/response cycle nondeterministic, like, for instance:

  • The requestor creating a GUID (different each time). This makes matching the recorded response which matches that request tricky.
  • Different ordering of things buried in a list somewhere.
  • Timestamp being sent as a key and the response coming back somewhere.
  • Timestamp being part of the authentication mechanism.

I tend to find I need a bit of code to accommodate these things. The goal for me is that the server is flexible enough to handle these things without requiring oodles of code and being able to handle recording APIs in a real mode.

1 Like