How to Specify the Path to save Newman report on Jenkins using Postman?

We can specify the path to save Newman's report on Jenkins. Jenkins reports are available in various formats and can be managed by appending flags in the build commands. Besides, we can mention the path of the directory where the reports shall get saved with the help of these build commands.

The steps to specify the path to save Newman reports on Jenkins are listed below −

As a pre-condition, Jenkins should be established in the system. The steps to work with Jenkins are available in the link − Moreover, the Newman should be installed in the system and a Collection with requests should be created.

Step1 − Click on the arrow to the right of the name of the Collection in the sidebar. Then click on Share.

Step2 − The pop-up - SHARE COLLECTION1 opens up. Navigate to Get public link and copy the link which marked in the below image.

Step3 − Open Jenkins and navigate to the Jenkins Job below the Build section. Enter the below command to generate CLI and JUNIT reports in a specific path −

newman run "<link in Step2>" --reporters cli, junit --reporter-junit-export "reportGenerate/report_newman.xml"

In the above command, reportGenerate/report_newman.xml is the path of the file where the report shall be saved. If it is non-existent, the report is generated inside the Jenkins Workspace directory automatically.

Updated on: 25-Jun-2021


Kickstart Your Career

Get certified by completing the course

Get Started