Testing Tools for web API
Web API’s have long been used to allow programmers access to functionality via a well defined interface without the need to understand exactly how that functionality is implemented. I was using Hurl and fiddler recently for Web API testing and I hope it is helpful for Web Api developers as well as consumers to test out the services.
- Hurl: you can download at http://hurl.it/
Hurl is a Web-based tool for testing APIs. You could choose the request method, customize headers and POST parameters, add basic authorization, and follow redirects. Then view the nicely formatted request and response. It is a very clean and easy tool for testing your APIs.
Here is the Twitter API reference page I used: https://dev.twitter.com/docs/api/1/get/search
HURL provides five HTTP methods: PUT, GET, POST, DELTE, and HEAD. And you could apply HTTP basic access authentication. You could also view request and response body in full size view (a pop up window). Another thing I like Hurl is that for response body, it highlights the contents with different colors, which made it really easy to read.
You could also login and after that, you could view your call history:
By clicking on each URL you will be redirected back to request page with parameters you used previously. And you could repeat the test again or modify on the past test.
Fiddler: you can download at http://www.fiddler2.com/fiddler2/
There are two parts of Fiddler you may be interested in immediately. Firstly, it is the request builder showed above. You could customize your request. It has almost all types of HTTP methods supported. By pressing the Execute button you will see the response return.
Secondly, it is the Session Inspector. By clicking on the web sessions history on the left side, you could inspect each session individually with details showed up on Inspectors.
Another interesting feature for Fiddler is that it provides Web View, so you could see images that are returned. This allows you to see specifically what was returned to the browser before it was interpreted.
Fiddler is a very powerful tool has much more functions than I introduced. You could refer to Fiddler help document for more information. http://www.fiddler2.com/Fiddler/help/