Newman: Running the postman script using Newman on remote Jenkins server

Created on 11 May 2017  路  7Comments  路  Source: postmanlabs/newman

Hi,
Can anyone let me know how to run the Postman generated json script on a remote Jenkins server using Newman.

My requirement is:

  • I have created lots of tests and can run it easily locally from terminal using Newman command
  • I basically want to run the test from remote Jenkins

What should I do for this?

Regards,
Bijo

documentation question

All 7 comments

Please refer to the following blog post:

http://blog.getpostman.com/2015/09/03/how-to-write-powerful-automated-api-tests-with-postman-newman-and-jenkins/

Also, please read up on our migration guide: https://github.com/postmanlabs/newman/blob/develop/MIGRATION.md, as the blog post was written with a version of Newman that is now deprecated.

Sorry for the late reply...

Since my Json file is in my local, can I generate the sharelink and pass that in jenkins job to run my tests?
In the following way under "Execute Shell":-

newman -c https://www.getpostman.com/collections/d1574ef972de1ee4a --exitCode 1

But it fails immediately while running.
Do we need "Newman" to be installed in the Jenkins Server first?

Regards,
Bijo

Finally I succeeded to run in a dockerized manner.
Thanks for your help

Regards,
Bijo

In new version you just run
newman run CollectionName.postman_collection.json

If you are running the as Execute Shell option, the build will fail

Setup

image

Result

image

Hi Guys,

I'm using Newman but i have few questions

Do we need "Newman" to be installed in the Jenkins Server??
Can we run Newman via Jenkins Server like rcon job ??
Is there any template where we get response VS time graph in output?

Thanks in Advance

@trollcodelord Newman is a command line tool to run postman collections.
So in order to run it from jenkins, you may use shell script feature of Jenkins Pipeline or Jenkins freestyle projects through which you can run the newman command as per the Newman documentation.

Finally I succeeded to run in a dockerized manner.
Thanks for your help

Regards,
Bijo

Hi please tell the process . How did you run it

Was this page helpful?
0 / 5 - 0 ratings