{"id":2384,"date":"2015-02-09T01:04:38","date_gmt":"2015-02-09T06:04:38","guid":{"rendered":"http:\/\/qxf2.com\/blog\/?p=2384"},"modified":"2015-04-12T08:34:39","modified_gmt":"2015-04-12T12:34:39","slug":"api-testing-ui-tools-postman","status":"publish","type":"post","link":"https:\/\/qxf2.com\/blog\/api-testing-ui-tools-postman\/","title":{"rendered":"API Testing: UI Tools"},"content":{"rendered":"<p>In this post we will explore three UI tools you can use for API testing: Postman, SoapUI and Runscope. We do a deep dive into using <a href=\"https:\/\/chrome.google.com\/webstore\/detail\/postman-rest-client\/fdmmgilgnpjigdojojpjoooidkmcomcm?hl=en\">Postman<\/a> for API testing because <a href=\"http:\/\/www.qxf2.com\/?utm_source=api_testing_2&#038;utm_medium=click&#038;utm_campaign=From%20blog\">we<\/a> love using Postman. This post is the second in a series of blog posts on API testing. You can find the first part <a href=\"http:\/\/qxf2.com\/blog\/api-testing-developer-tools\">here<\/a>.<\/p>\n<hr>\n<h3>1. Postman<\/h3>\n<p>Postman is an extremely efficient tool to work with APIs. You can construct simple as well as complex requests quickly. You can process different types of request like GET, PUT, POST, DELETE etc, pass different URL parameters along with the headers and cookies. All the transactions processed will be saved in History section and can be accessed for later use. You can also create your own collection which lets you group individual requests together. You can also view the response in different formats like JSON, XML, HTML and Text. Postman can dramatically cut down the time required to test and develop APIs.<\/p>\n<h3>Getting started with Postman<\/h3>\n<p>1. Installing Postman client<br \/>\n2. Create a test<br \/>\n3. Create a request by adding Request URL, method and URL params<br \/>\n4. Run the test<br \/>\n5. Check the result<\/p>\n<h3>Detailed steps<\/h3>\n<p><strong>STEP 1: Installing Postman client<\/strong><br \/>\nYou can install the Postman &#8211; REST Client in your google chrome browser by clicking on this <a href=\"https:\/\/chrome.google.com\/webstore\/detail\/postman-rest-client-packa\/fhbjgbiflinjbdggehcddcbncdddomop\">link<\/a>.<br \/>\n<a href=\"http:\/\/qxf2.com\/blog\/wp-content\/uploads\/2015\/02\/Launch_postman.png\" data-rel=\"lightbox-image-0\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/qxf2.com\/blog\/wp-content\/uploads\/2015\/02\/Launch_postman-300x164.png\" alt=\"Launch Postman Client\" width=\"300\" height=\"164\" class=\"aligncenter size-medium wp-image-2423\" srcset=\"https:\/\/qxf2.com\/blog\/wp-content\/uploads\/2015\/02\/Launch_postman-300x164.png 300w, https:\/\/qxf2.com\/blog\/wp-content\/uploads\/2015\/02\/Launch_postman.png 970w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Once you install you can use the chrome app launcher to open the postman client as shown below.<br \/>\n<a href=\"http:\/\/qxf2.com\/blog\/wp-content\/uploads\/2015\/01\/Postman_Launch.jpg\" data-rel=\"lightbox-image-1\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/qxf2.com\/blog\/wp-content\/uploads\/2015\/01\/Postman_Launch-300x159.jpg\" alt=\"Launch Postman\" width=\"300\" height=\"159\" class=\"aligncenter size-medium wp-image-2387\" srcset=\"https:\/\/qxf2.com\/blog\/wp-content\/uploads\/2015\/01\/Postman_Launch-300x159.jpg 300w, https:\/\/qxf2.com\/blog\/wp-content\/uploads\/2015\/01\/Postman_Launch-1024x544.jpg 1024w, https:\/\/qxf2.com\/blog\/wp-content\/uploads\/2015\/01\/Postman_Launch.jpg 1356w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p><strong>STEP 2: Create a Test<\/strong><br \/>\nAs an example we will test the public api at <a href=\"https:\/\/open.fda.gov\/\">OpenFDA<\/a>. OpenFDA is an Elasticsearch-based API that serves publicly accessible data about drugs, devices and food. We will add a test to search for records listing a specific drug with count of the ten most frequently reported patient reactions. <\/p>\n<p><strong>STEP 3: Create a request by adding Request URL, method and URL params <\/strong><\/p>\n<pre lang=\"python\">\r\nhttps:\/\/api.fda.gov\/drug\/event.json?count=patient.reaction.reactionmeddrapt.exact&search=patient.drug.openfda.pharm_class_epc:\"nonsteroidal+anti-inflammatory+drug\"&limit=10\r\n<\/pre>\n<p>In the Normal tab you can create request by entering  URL, adding parameters, headers etc<\/p>\n<ul>\n<li>Select the type of method (GET, POST etc) and enter the URL of the application under test<\/li>\n<li>You can add header parameters like Content Type etc<\/li>\n<li>Add the URL parameter which has to be sent as part of the query string. For this example we have added parameters like count, search and limit<\/li>\n<\/ul>\n<p><strong>STEP 4: Run the test<\/strong><br \/>\nSend the request by clicking on Send button<\/p>\n<p><a href=\"http:\/\/qxf2.com\/blog\/wp-content\/uploads\/2015\/02\/Postman_RunTest.jpg\" data-rel=\"lightbox-image-2\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/qxf2.com\/blog\/wp-content\/uploads\/2015\/02\/Postman_RunTest-300x89.jpg\" alt=\"Run Postman Test\" width=\"300\" height=\"89\" class=\"aligncenter size-medium wp-image-2427\" srcset=\"https:\/\/qxf2.com\/blog\/wp-content\/uploads\/2015\/02\/Postman_RunTest-300x89.jpg 300w, https:\/\/qxf2.com\/blog\/wp-content\/uploads\/2015\/02\/Postman_RunTest-1024x305.jpg 1024w, https:\/\/qxf2.com\/blog\/wp-content\/uploads\/2015\/02\/Postman_RunTest.jpg 1355w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p><strong>STEP 5: Check the result<\/strong><br \/>\nYou can view the response as shown below. The response returned is in JSON format. You can also view the response in different format like HTML, Text etc. You can also view the Status which in this case is 200.<\/p>\n<p><a href=\"http:\/\/qxf2.com\/blog\/wp-content\/uploads\/2015\/02\/Postman_View_Result.jpg\" data-rel=\"lightbox-image-3\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/qxf2.com\/blog\/wp-content\/uploads\/2015\/02\/Postman_View_Result-300x157.jpg\" alt=\"Check result for the Request\" width=\"300\" height=\"157\" class=\"aligncenter size-medium wp-image-2428\" srcset=\"https:\/\/qxf2.com\/blog\/wp-content\/uploads\/2015\/02\/Postman_View_Result-300x157.jpg 300w, https:\/\/qxf2.com\/blog\/wp-content\/uploads\/2015\/02\/Postman_View_Result-1024x536.jpg 1024w, https:\/\/qxf2.com\/blog\/wp-content\/uploads\/2015\/02\/Postman_View_Result.jpg 1363w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<hr>\n<h3>2. Soap UI<\/h3>\n<p> SoapUI supports extensive testing of REST services and their resources, representations, etc. <a href=\"http:\/\/www.soapui.org\/\">SoapUI<\/a> is among the oldest UI tools for API testing. There are plenty of excellent tutorials already available. So we&#8217;d rather not write about it. You can refer to this <a href=\"http:\/\/www.soapui.org\/REST-Testing\/getting-started.html\">link<\/a> if you want to explore this API testing tool. <\/p>\n<hr>\n<h3>3. Runscope<\/h3>\n<p>We enjoyed using <a href=\"https:\/\/www.runscope.com\/\">Runscope<\/a>. Runscope has a polished web interface and provides some scripting capabilities too. Please refer to our earlier blog <a href=\"http:\/\/qxf2.com\/blog\/api-testing-using-runscope\/\">API Testing using Runscope<\/a> for more details.<\/p>\n<hr>\n<p>And so we end the second stage of our three part journey in learning about API testing. In our final post, we will show you how to write API tests using Python. Stay tuned! <\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>In this post we will explore three UI tools you can use for API testing: Postman, SoapUI and Runscope. We do a deep dive into using Postman for API testing because we love using Postman. This post is the second in a series of blog posts on API testing. You can find the first part here. 1. Postman Postman is [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[43,84,42,85],"tags":[],"class_list":["post-2384","post","type-post","status-publish","format-standard","hentry","category-api-testing","category-postman","category-runscope","category-soap-ui"],"_links":{"self":[{"href":"https:\/\/qxf2.com\/blog\/wp-json\/wp\/v2\/posts\/2384","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/qxf2.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/qxf2.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/qxf2.com\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/qxf2.com\/blog\/wp-json\/wp\/v2\/comments?post=2384"}],"version-history":[{"count":31,"href":"https:\/\/qxf2.com\/blog\/wp-json\/wp\/v2\/posts\/2384\/revisions"}],"predecessor-version":[{"id":2496,"href":"https:\/\/qxf2.com\/blog\/wp-json\/wp\/v2\/posts\/2384\/revisions\/2496"}],"wp:attachment":[{"href":"https:\/\/qxf2.com\/blog\/wp-json\/wp\/v2\/media?parent=2384"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/qxf2.com\/blog\/wp-json\/wp\/v2\/categories?post=2384"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/qxf2.com\/blog\/wp-json\/wp\/v2\/tags?post=2384"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}