All Articles

API's testing tools

I've been doing recently a lot of work integrating different backend systems, using its APIs, tipically in some form of a REST API. The current post has the main goal to enumerate tools that I currently use to become my work easier to explore and diagnose APIs, before getting my hands dirty with code.

RequestBin

I've already introduced this tool in another post. Basically, this tool allows us to check the requests that are being made by our application to a given endpoint.

339204d713fedee50c4a7b68251efbbf00f93e50be41b5e5d21cc68a463d0720

Postman

Postman is a REST client that runs as a Chrome packaged app. It's an absolutely essential tool to use when you start exploring an API's service provider. Here are the main features:

  • Create requests quickly:
    • supports different formats (json, xml, url parameters, etc.)
    • suports basic authentication
    • provides oauth helpers
    • key/value editors for adding parameters or header values (works for URL parameters too)
  • Document and share APIs:
    • Use collections to organize requests and share them quickly using URLs.
    • Document requests inside collections
  • Collections:
    • Collections can be any group of requests.
    • You can save any kind of request. While saving the request you can also add a name and a note.
    • Collections can be downloaded and shared as a file.

434904c8d2b52ad7718bebd9b81548f85e31a16b93dc474be5dd55d23b29c3ba

Runscope

Runscope is the company that brings us RequestBin, and it has developed a SaaS app which allows us to test our APIs. It has different components:

  • Runscope Radar: a test runner and framework
  • API traffic inspector: allows to check all the traffic that is flowing through our account
  • Passageway: Passageway allows you and your team to temporarily share your local web server with others via a public URL

For the current work that I'm doing, I've just used API traffic inspector and Passageway

API traffic inpector

It's similiar to Requestbin, since it allows us to capture a given request, but it's more powerfull:

  • it can act as a gateway to a given real endpoint
  • it can replay a previous response

76003d9c943386c1d2eafbbb2c5b90cbd09b81e7435a8903df456189a1c648f8

Passageway

It was never been easy to expose our local web server to the world. Just download the app and run it.

Zapier

Finally I want to say someting about Zapier. Zapier makes it easy to automate tasks between web apps. Sometimes I have to use Zapier to allow me to test an end to end scenario. Let me give you an example: the system I'm working on provides me an abstraction (a class) that allows me to call a web hook. Internally, the framework that uses that class does not allow to use HTTP calls, and requires that any call would be HTTPS. I was using requestbin to check the payload that the system was producing, but Requestbin does not allow to have HTTPS endpoints (at least without the SSL certificate warning). By that time I didn't know Runscope. So, my solution was to create a Zap in Zapier, that receives on a webhook listening an HTTPS endpoint and sends the request to another webhook on RequestBin. I strongly recommend to check Zapier, since it opens a variety of integration scenarios out of the box.

96a6677992c99cfd170d39f3bf93f71bdf3d607d64cd3bbeb6ab64035fd362b2

Conclusion: I'm sure there are other great tools out there, but these are the ones that I'm currently using. Besides the tools I've mentioned,. we should have a good understanding of REST architecture style, and how HTTP protocol works.

Published Feb 18, 2014

Cloud Solutions and Software Engineer. Married and father of two sons. Obsessed to be a continuous learner.