title: Executing Newman REST API tests using Jenkins on Linux
body: <p>I found this answer <a href="https://stackoverflow.com/questions/36632059/integrate-postman-test-scripts-with-jenkins-build-server">Integrate Postman test scripts with Jenkins build server</a> (and possibly there are other ones that could answer my question but I just suck at finding them) but I am still running into issues. I am trying to execute the following with newman v3 using jenkins as a way to automate our REST API Testing.</p>
  
  <p>My Execute Shell script looks like this under the Build steps in the jenkins job</p>
  
  <pre><code>#!/bin/bash
  pwd
  cd ${PROJECT_NAME}/${GIT_SUBFOLDER}
  pwd
  ls
  newman run ${COLLECTION_NAME} -e ${ENVIRONMENT_NAME} -r html,cli,json,junit --insecure
  </code></pre>
  
  <p>Ignore the pwds and ls as I originally thought I wasn't in the right directory for my collection and environment exports.</p>
  
  <p>The error I keep getting back in jenkins is:</p>
  
  <blockquote>
    <p>/tmp/hudson1153303836033593524.sh: line 6: newman: command not found</p>
  </blockquote>
  
  <p>Any help would be greatly appreciated!</p>