5 tools to help developing and testing APIs

Filipe Ximenes
May 18, 2016
<p>Here are some very useful tools that can assist you while developing, debugging and testing web APIs.</p><h2 id="1-postman">1. <a href="https://www.getpostman.com">Postman</a></h2><p>Postman used to be a simple Chrome plugin to execute requests in a user-friendly interface where you could try different types of request parameters and inspect responses. But it has grownup and now it not only it helps you executing and inspecting the requests but it's also a full-featured tool to test APIs, both locally and in production. It runs locally and allows you to create environments so it's easy to change between local and production requests. It has support for multiple authentication methods (like OAuth1, OAuth2, Basic authentication) so you don't have to bother with complicated schemes. Tests are very easy to write and can be done in JavaScript. The interface is simple and after some tweaking you are ready to start building your test suite. There's also a paid plan where you can share everything among your team and keep things synced.</p><h2 id="2-runscope">2. <a href="https://www.runscope.com">Runscope</a></h2><p>Runscope is in some ways similar to Postman, but it's made to work with your production endpoints. You can configure it to run every day or every few minutes and let you know if some endpoint is behaving differently than expected. Tests are configured in a web interface. Apart from its tests functionalities it has a couple of other useful tools. For example you can setup a middleware that will capture requests and responses for inspection. It goes like this: suppose you are making a call to a third party API, you can send the request to Runscope, it will record everything about the request, send it to the third party, record the response and send it back to your system. It also offers libs that will make the whole process almost transparent to your system.</p><h2 id="3-ngrok">3. <a href="https://ngrok.com/">ngrok</a></h2><p>ngrok provides a way for you to expose your local environment to the web. There are many applications for this, one of the most interesting is testing integrations with web hooks. Requests made to ngrok can be routed to your local machine allowing you to assure everything is working before pushing to production. Another cool use case is being able to exposing an API under development to a mobile app.</p><h2 id="4-requestbin">4. <a href="http://requestb.in/">RequestBin</a></h2><p>RequestBin is a very simple service that will record requests. It's just like the Runscope tool but it will not forward the call. The advantage is that there's no setup needed, you simply create a URL to listen to calls and can start using it. This is a quick way to investigate if a client is doing requests correctly.</p><h2 id="5-frisby-js">5. <a href="http://frisbyjs.com/">Frisby.js</a></h2><p>Frisby is for the ones that want to perform tests on APIs but don't want to deal with web interfaces. It is a library that relies on <a href="https://nodejs.org/en/">Node.js</a> and <a href="http://jasmine.github.io/">Jasmine</a> to allow you to make requests and test responses in a simple way. Here you will be free to write JavaScript code and organize environments as you wish. After writing your tests you may want to setup a CI to run them.</p>