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 https://www.getpostman.com/collections/8daaf8118386c8fce5ef

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:

How To Run Collections From Jenkins

Get our latest blog posts delivered to your inbox

Subscribe and get popular blog posts about software testing industry.

Rajkumar

Leave a Comment

Share via
Copy link
Powered by Social Snap