paint-brush
Never mock an API againby@meeshkan
873 reads
873 reads

Never mock an API again

by Meeshkan MLNovember 21st, 2018
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Let’s face it, mocking sucks. Every programming language and platform has different tools to help you mock API calls, but all of them share some common fragilities:
featured image - Never mock an API again
Meeshkan ML HackerNoon profile picture

Why we use unmock for our full stack

Let’s face it, mocking sucks. Every programming language and platform has different tools to help you mock API calls, but all of them share some common fragilities:

  • No clean way to verify if the mocks are correct representations of the API.
  • No way to avoid reverse engineering the API you’re mocking.
  • No way to quickly mock internal APIs.
  • No way to monitor in production if the mocks from your tests resemble the data that you’re getting back in the wild.

As a result, teams lose tons of time and energy writing mocks for their unit and integration tests, which leads to buggy tests, less test coverage, and ultimately a less reliable production environment.

unmock

Enter unmock. Unmock is great because it basically takes care of all of this stuff for you. There is a good YouTube overview of the service (currently in closed beta), but I thought I’d walk you through how unmock speeds our team up at Meeshkan.