{"id":238281,"date":"2022-07-15T02:39:00","date_gmt":"2022-07-15T06:39:00","guid":{"rendered":"https:\/\/wordpress-756359-3782526.cloudwaysapps.com\/?p=238281"},"modified":"2024-09-30T07:57:34","modified_gmt":"2024-09-30T07:57:34","slug":"22-07-15-postman","status":"publish","type":"post","link":"https:\/\/www.travis-ci.com\/blog\/22-07-15-postman\/","title":{"rendered":"Integrating Postman with Travis"},"content":{"rendered":"\n<p>Postman is an API platform for developers to design, build, test and iterate their APIs. Now let\u2019s connect Travis CI with Postman and learn something new!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"usage\">Usage<\/h2>\n\n\n\n<p>To get started on the integration with Postman in Travis, first you\u2019ll need to login to Postman, and setup Newman. Once you\u2019ve added Newman, add the Newman configuration you copied from Postman to the&nbsp;<code>.travis.yml<\/code>&nbsp;file. My current&nbsp;<code>.travis.yml<\/code>&nbsp;file looks like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>language: node_js\nnode_js:\n- \"12.18.3\"\n\ninstall:\n- npm install newman\n\nbefore_script:\n- node --version\n- npm --version\n- node_modules\/.bin\/newman --version\n\nscript:\n- node_modules\/.bin\/newman run https:\/\/api.getpostman.com\/collections\/4946945-3673316a-9a35-4b0d-a148-3566b490798d?apikey=$KEY --environment https:\/\/api.getpostman.com\/environments\/16724969-8e6c6119-ed57-4665-b4f9-f648c5637484?apikey=$KEY<\/code><\/pre>\n\n\n\n<p>Note, you\u2019ll need to eplace all instances of&nbsp;<code>$KEY<\/code>&nbsp;with a valid Postman API key. The Newman GUI will look a little like this:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"710\" src=\"https:\/\/www.travis-ci.com\/wp-content\/uploads\/2022\/07\/179301052-a04e92b5-d48c-4ff9-b30d-da04d61c47d1-1024x710-1.png\" alt=\"179301052-a04e92b5-d48c-4ff9-b30d-da04d61c47d1-1024x710\" class=\"wp-image-242771\" srcset=\"https:\/\/www.travis-ci.com\/wp-content\/uploads\/2022\/07\/179301052-a04e92b5-d48c-4ff9-b30d-da04d61c47d1-1024x710-1.png 1024w, https:\/\/www.travis-ci.com\/wp-content\/uploads\/2022\/07\/179301052-a04e92b5-d48c-4ff9-b30d-da04d61c47d1-1024x710-1-300x208.png 300w, https:\/\/www.travis-ci.com\/wp-content\/uploads\/2022\/07\/179301052-a04e92b5-d48c-4ff9-b30d-da04d61c47d1-1024x710-1-768x533.png 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>So now make a commit, and push your code. To view the test results in Postman, open your API and select the Tests tab.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"conclusion\">Conclusion<\/h2>\n\n\n\n<p>You now have an idea on how Postman and Travis work together using Newman. As always, if you have any questions, please email me&nbsp;<a href=\"mailto:montana@travis-ci.org\">montana@travis-ci.org<\/a>&nbsp;for help\/and or if you need assistance with this tutorial.<\/p>\n\n\n\n<p>Happy building!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Postman is an API platform for developers to design, build, test and iterate their APIs. Now let\u2019s connect Travis CI with Postman and learn something new! Usage To get started on the integration with Postman in Travis, first you\u2019ll need to login to Postman, and setup Newman. Once you\u2019ve added Newman, add the Newman configuration [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_breakdance_hide_in_design_set":false,"_breakdance_tags":"","footnotes":""},"categories":[16],"tags":[7,19,20,5],"class_list":["post-238281","post","type-post","status-publish","format-standard","hentry","category-news","tag-community","tag-feature","tag-infrastructure","tag-news"],"_links":{"self":[{"href":"https:\/\/www.travis-ci.com\/wp-json\/wp\/v2\/posts\/238281","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.travis-ci.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.travis-ci.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.travis-ci.com\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.travis-ci.com\/wp-json\/wp\/v2\/comments?post=238281"}],"version-history":[{"count":2,"href":"https:\/\/www.travis-ci.com\/wp-json\/wp\/v2\/posts\/238281\/revisions"}],"predecessor-version":[{"id":242772,"href":"https:\/\/www.travis-ci.com\/wp-json\/wp\/v2\/posts\/238281\/revisions\/242772"}],"wp:attachment":[{"href":"https:\/\/www.travis-ci.com\/wp-json\/wp\/v2\/media?parent=238281"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.travis-ci.com\/wp-json\/wp\/v2\/categories?post=238281"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.travis-ci.com\/wp-json\/wp\/v2\/tags?post=238281"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}