3

this is my first time using Jenkins for automated test.I've tried to run a test by integrate Newman with Jenkins but I always get the

Console Error

"Newman : command not found"

as a result,it's make my test failed.

I have looking for some answers on the Internet and some tell me to add a value for Environment variables, but I don't know how to get the exact value to add to this. Please show me where can I get this.I'm using MacOS High Sierra

Jenkins Environment variables

1
  • also add Console Output from jenkins in your question
    – Mukesh M
    Commented Nov 4, 2018 at 15:58

3 Answers 3

18
  1. Install https://plugins.jenkins.io/nodejs in jenkins

  2. In Global Tool Configuration add Nodejs and in "Global npm packages to install" add newman

Global Tool Configuration add Nodejs

  1. In Build Environment use "Provide Node & npm bin/ folder to PATH"

  2. In Build add "execute shell" if you are using linux or use "execute windows batch command" if you are on windows and add your newman command

    For example:

    newman run https://www.getpostman.com/collections/631643-f695cab7-6878-eb55-7943-ad88e1ccfd65-JsLv

newman

3
  • 1
    OMG thanks a lot for your help, this have solved my problem Commented Nov 5, 2018 at 3:20
  • @NhưNguyễn Note that the postman collections that I use in my answer may fail getpostman.com/collections/… but newman command will run fine.
    – Mukesh M
    Commented Nov 5, 2018 at 3:56
  • 3
    This is a life saver. Thanks:)
    – Adnan
    Commented Mar 3, 2019 at 9:29
0

the html extra reporter only worked for me once enabling 'locate executor' and flag "with ant" as well, under the provide node & npm option.

0

I had the similar problem. I had several lines of the text in the Command field. According to advice I used backslashes to make it look pretier and I couldn't create a report with Newman. I got a report only after deleteing the backslashes and writing all information in one line

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.