I’m continuing with my blog series on testing tools. This blog post focses on testing a RESTFUL web service provisioned by PO. The easiest way to perform a basic unit test of the interface is with a Chrome Plugin called DHC. It can be downloaded here DHC – REST/HTTP API Client – Chrome Web Store.

This tool provides an easy way to test requests using a simple web based UI. The requests can be saved into folders and easily exported to share.

In the following example I am sending a POST request to our PO system and the payload is JSON. A response is returned which is also JSON. The following explains how I populated the request

URL:  Make sure you use the correct URL.

Method: DHC requires a method (POST, GET, PUT etc…). In this instance we are posting data to PO.

Content Type: In this case it is application/json

Authorizations. Click on the ‘set an authorisation’ and you can enter your credentials and they are translated to the fomat required for Basic Authentication (using BASE64).

14-09-2015 12-15-40.jpg

Payload: Paste the payload in the BODY section, set the type to text and click on the JSON link at the bottom to format the request.

14-09-2015 12-16-03.jpg


Once executed the response will appear underneath

14-09-2015 12-16-24.jpg

There are a number of other tools that can be used, both online (such as Postman, another Chrome Add-in) or client based solutions such as SOAPui.

Blogs in Series

Blog 1: HTTP Post Testing: Test Tools…Part 1 *HTTP *

Blog 2: SFTP Testing: Test Tools…Part 2 * SFTP *

Blog 3: REST  Testing: Test Tools…Part 3 * REST *

Blog 4: SOAP Testing: Test Tools…Part 4 * SOAP *

Blog 5: SOAP Testing: Test Tools…Part 5 * JMeter *


To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply