Generate Newman Reports on Jenkins

How To Generate Newman Reports On Jenkins

In the previous articles on Postman Tutorial, we have covered “How to Debug Collection Run in Postman

In this “How to Generate Newman Reports on Jenkins in Postman” article, I will be demonstrating how you can implement this concept and get a tight grip over this.

How To Generate Newman Reports on Jenkins

To generate Newman reports on Jenkins, edit command in the Build section.

Postman Generate Newman Report

Command is :

C:\Users\Test\AppData\Roaming\npm\newman run https://www.getpostman.com/collections/8daaf8118386c8fce5ef –reporters cli,junit

Reports will be automatically created inside the Workspace at Jenkins directory. These reports can be viewed from Jenkins Workspace tab or from Workspace folder created where Jenkins is downloaded in our system.

Postman Generate Newman Report Jenkins

We can open the file and see that test results are in XML format.

Postman Generate Newman Report

Since this report is in XML format, we have an option to publish the report in Jenkins. Publishing report is a part of Post-build Actions. We basically write commands in Post-Build Actions to publish our report.

1. Go to the configure section. Go to Post-Build Actions.

Postman Generate Newman Report

2. Click Publish Junit Test Result Report

Postman Generate Newman Report

3. Enter the path of the file in Test Report XMLs. Save the changes. To build the project again, click on Build Now button.

4. From the Build history section, open the build results. Click on Test Result.

Postman Generate Newman Report

5. We can now see the test results which are easy to understand. We can see how many test cases failed/passed. Failed tests will be shown in red color. We can even see the Test name and its status along with duration.

Postman Generate Newman Report

Next steps:

Learn “Generate advanced HTML reports while using Newman” 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 Generate Newman Reports On 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