{"id":184,"date":"2018-11-11T19:24:50","date_gmt":"2018-11-11T19:24:50","guid":{"rendered":"http:\/\/holdentheriault.com\/blog\/?p=184"},"modified":"2018-11-11T19:24:50","modified_gmt":"2018-11-11T19:24:50","slug":"api-testing-a-google-postman-tutorial","status":"publish","type":"post","link":"https:\/\/holdentheriault.com\/blog\/index.php\/2018\/11\/11\/api-testing-a-google-postman-tutorial\/","title":{"rendered":"API Testing &#8211; A Google Postman Tutorial"},"content":{"rendered":"<h3>So you have an interest in using Postman as your API Testing tool?<\/h3>\n<p>Awesome! But before we begin, please be sure to read my blog on Postman found\u00a0<a href=\"https:\/\/holdentheriault.com\/blog\/index.php\/2018\/11\/11\/api-testing-google-postman\/\"><strong>here.\u00a0<\/strong><\/a><\/p>\n<p>Let&#8217;s get started! First, navigate to <a href=\"https:\/\/github.com\/HoldenRiot\/postman-tutorial\"><strong>my tutorials github repository<\/strong><\/a> and download the project.<\/p>\n<p>Here is a very basic\u00a0<a href=\"https:\/\/www.getpostman.com\/\" rel=\"nofollow\">Postman<\/a>\u00a0tutorial for testing and training purposes. <a href=\"https:\/\/github.com\/HoldenRiot\/postman-tutorial\">This repository<\/a> contains the following files: The Postman Collection(<code>PostmanTutorial.postman_collection<\/code>), The Data File(<code>\u00a0postman.data.json<\/code>), and this\u00a0<code>ReadMe<\/code>\u00a0file.<\/p>\n<h2><a id=\"user-content-requirements\" class=\"anchor\" href=\"https:\/\/github.com\/HoldenRiot\/postman-tutorial#requirements\" aria-hidden=\"true\"><\/a>Requirements:<\/h2>\n<ul>\n<li><a href=\"https:\/\/nodejs.org\/en\/\" rel=\"nofollow\">NPM<\/a><\/li>\n<li><a href=\"https:\/\/www.npmjs.com\/package\/newman\" rel=\"nofollow\">Newman<\/a>\n<ul>\n<li>$\u00a0<code>npm install newman --global;<\/code><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h2><a id=\"user-content-instructions\" class=\"anchor\" href=\"https:\/\/github.com\/HoldenRiot\/postman-tutorial#instructions\" aria-hidden=\"true\"><\/a>Instructions:<\/h2>\n<ol>\n<li>Download\/Clone this repository.<\/li>\n<li>In a new Terminal window, navigate to your newly downloaded\/cloned\u00a0<code>postman-tutorial<\/code>\u00a0project.<\/li>\n<\/ol>\n<h3><a id=\"user-content-running-the-collection\" class=\"anchor\" href=\"https:\/\/github.com\/HoldenRiot\/postman-tutorial#running-the-collection\" aria-hidden=\"true\"><\/a>Running the Collection:<\/h3>\n<ol>\n<li>In a new Terminal Window, Navigate to the folder containing the\u00a0<code>PostmanTutorial.postman_collection<\/code>\u00a0and the\u00a0<code>postman.data.json<\/code>\u00a0files. (cd into the project directory).<\/li>\n<li>Run $<code>newman run PostmanTutorial.postman_collection --insecure -d postman.data.json<\/code><\/li>\n<\/ol>\n<h3><a id=\"user-content-editing-the-data-tested\" class=\"anchor\" href=\"https:\/\/github.com\/HoldenRiot\/postman-tutorial#editing-the-data-tested\" aria-hidden=\"true\"><\/a>Editing the Data Tested:<\/h3>\n<ol>\n<li>Open the\u00a0<code>postman.data.json<\/code>\u00a0file in your preffered IDE, notepad or terminal window.<\/li>\n<li>Make edits, save, and ReRun the collection.<\/li>\n<\/ol>\n<h3><a id=\"user-content-editing-tests\" class=\"anchor\" href=\"https:\/\/github.com\/HoldenRiot\/postman-tutorial#editing-tests\" aria-hidden=\"true\"><\/a>Editing Tests:<\/h3>\n<ol>\n<li>Open\u00a0<a href=\"https:\/\/www.getpostman.com\/\" rel=\"nofollow\">Postman<\/a><\/li>\n<li>Once Postman is open, On the Top Navigation Bar, click\u00a0<code>Import<\/code><\/li>\n<li>Import the\u00a0<code>PostmanTutorial.postman_collection<\/code>\u00a0file.<\/li>\n<li>Navigate to your newly imported\u00a0<code>PostmanTutorial<\/code>\u00a0collection in Postman.<\/li>\n<li>Click\u00a0<em>Tests<\/em>\u00a0to view the Tests for the collection.<\/li>\n<li>Click\u00a0<em>Save<\/em>\u00a0to save your changes.<\/li>\n<li>Hover over your Postman Collection name and click the three dots (<em>&#8230;<\/em>)<\/li>\n<li>Cick\u00a0<em>Export<\/em><\/li>\n<li>Select the\u00a0<em>Collection v2<\/em>\u00a0option and click\u00a0<em>Export<\/em><\/li>\n<li>Save to the same folder location and overwrite\u00a0<code>PostmanTutorial.postman_collection<\/code>.<\/li>\n<li>Run your Collection.<\/li>\n<\/ol>\n<h3><a id=\"user-content-generating-run-reports\" class=\"anchor\" href=\"https:\/\/github.com\/HoldenRiot\/postman-tutorial#generating-run-reports\" aria-hidden=\"true\"><\/a><a href=\"https:\/\/github.com\/postmanlabs\/newman#reporters\">Generating Run Reports<\/a>:<\/h3>\n<ol>\n<li>Install newman html reporter by doing a $<code>npm install -g newman-reporter-html<\/code>\u00a0in a terminal window.<\/li>\n<\/ol>\n<h4><a id=\"user-content-usage\" class=\"anchor\" href=\"https:\/\/github.com\/HoldenRiot\/postman-tutorial#usage\" aria-hidden=\"true\"><\/a>Usage:<\/h4>\n<p>In order to enable this reporter, specify html in Newman&#8217;s\u00a0<code>-r<\/code>\u00a0or\u00a0<code>--reporters<\/code>\u00a0option.<\/p>\n<ul>\n<li><strong>Example:<\/strong>\u00a0$<code>newman run PostmanTutorial.postman_collection --insecure -d postman.data.json -r html<\/code><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>So you have an interest in using Postman as your API Testing tool? Awesome! But before we begin, please be sure to read my blog&#8230;<\/p>\n<div class=\"more-link-wrapper\"><a class=\"more-link\" href=\"https:\/\/holdentheriault.com\/blog\/index.php\/2018\/11\/11\/api-testing-a-google-postman-tutorial\/\">Continue reading<span class=\"screen-reader-text\">API Testing &#8211; A Google Postman Tutorial<\/span><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26,15,14],"tags":[],"class_list":["post-184","post","type-post","status-publish","format-standard","hentry","category-api","category-how-to","category-training","entry"],"_links":{"self":[{"href":"https:\/\/holdentheriault.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/184","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/holdentheriault.com\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/holdentheriault.com\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/holdentheriault.com\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/holdentheriault.com\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=184"}],"version-history":[{"count":1,"href":"https:\/\/holdentheriault.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/184\/revisions"}],"predecessor-version":[{"id":185,"href":"https:\/\/holdentheriault.com\/blog\/index.php\/wp-json\/wp\/v2\/posts\/184\/revisions\/185"}],"wp:attachment":[{"href":"https:\/\/holdentheriault.com\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=184"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/holdentheriault.com\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=184"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/holdentheriault.com\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=184"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}