How to Run Collections from Jenkins

How To Run Collections From Jenkins

In the previous articles on Postman Tutorial, we have covered “How to run Collections Remotely (with URL) in Postman

In this “How To Run Collections from Jenkins” article, I will be demonstrating how you can implement this concept and get a tight grip over this.

Follow the steps to create a new job in Jenkins and run Postman Collections from Jenkins.

1. Create a new job. Click on New Item.

Postman Jenkins New Item

2. Enter any name and select Freestyle project and Hit Ok.

 Postman Jenkins New Item

3. Now we have to configure this. Under the Build Environment tab, we will go to the Build section and add a build step. For windows machine, select Execute Windows batch command. For Mac or Linux, select Execute shell

Postman Jenkins Build Environment

4. Now we have to give the command to run the postman collection.

C:\Users\Test\AppData\Roaming\npm\newman run

Click on Save.

Postman Jenkins Build

5. Go to the Home page and click on the Manage Jenkins option on the extreme left side. Then Click on Configure Systems. Now under Global Properties section, click on environmental variables and add Name: PATH, Value: C:\Program Files\Nodejs

Postman Jenkins Build Global Properties

6. Under the Shell section, Add C:\Windows\System32\cmd.exe in Shell executable field. Click Save.

Postman Jenkins Build Shell Section

7. Now run the job using option Build Now. A new build will be started.

Postman Jenkins Build Now

8. We can see the Console Output as well. We get Unicode character, so we can view it as plain text. We can now see our Postman run getting executed and we are getting the report as well on Jenkins.

Postman Jenkins Report

Next steps:

Learn “How to debug Collection run in Postman” in the next tutorial.

Author Bio: This article is written by Harsha Mittal an ISTQB-CTFL Certified Software Test Engineer having 3.5+ years of experience in Software Testing.

Related posts:

Sharing is caring.

Share on facebook
Share on twitter
Share on linkedin

Like This Post?

We have a lot more where that came from?

We only send really good stuff occasionally, promise.

Rajkumar SM

Leave a Comment

Your email address will not be published. Required fields are marked *

Share on facebook
Share on google
Share on twitter
Share on linkedin
Share on whatsapp

Recent Posts:

Scroll to Top
API Testing eBook