Hacker News new | ask | show | jobs
by ntrepid8 3871 days ago
Is this for writing tests against? Won't the tests fail if this service is not available? If you need a static response why not save it as a file and have a local temp server respond?
3 comments

This was created for manual testing of multiple scenarios while integrating with external APIs. We wanted something simple hosted, we didn't want this to be deployed multiple environments with config files or one environment where people might unintentionally overwrite or conflict with other's files. Creating stubs via web was easier was developers, QA's and SMEs testing the product.

Though you could use this for automated tests, I request you to wait till I get a better server with higher availability. For automated integration tests there other great stub servers in different languages.

I use a similar system when building mobile app features.

Sometimes (almost always) an app feature is developed parallel to the API service.

It's useful to return a mock response so you can build the entire feature including networking. This way you don't need to wait for the server side component to finish.

A temp server takes time to set up and maintain. It's like any tool. Why use Dropbox if you can just save your file to a usb drive and carry it around everywhere?

Yup. We are building a product with micro services architecture, more often we finalise the API contract with other service teams and develop our service against stubbed response till the other teams complete their development
I assume it's meant to be there for those who don't have a nifty http mocking library.
Yup. Specially for people who can't or don't want to run their own stub servers