-1

when running this in cli, it generates the report. but when I use the same command in Jenkins, no report is generated. newman run "C:\WORK\getMix-REST.postman_collection.json" --reporters htmlextra --reporter-htmlextra-export "C:\Jenkins\workspace\getMix_report.html"

This is the message shown in Jenkins.

newman: could not find "htmlextra" reporter ensure that the reporter is installed in the same directory as newman please install reporter using npm

I have verified that newman and html extra are installed in the correct directories

newman installation:

enter image description here

I'm stuck. please help. Thanks

**Update: when I use just newman-reporter-html instead of newman-reporter-htmlextra, it works fine and report is generated. both reporters are installed on the same level, not sure why html extra doesn't work??

Nitin Bisht
  • 5,053
  • 4
  • 14
  • 26
Max
  • 3
  • 3
  • install your reporter tool using -g flag . The command should look like `npm install newman -g`. Also make sure if there is a correct tools configuration in your Jenkins for doing npm operation. – Manmohan_singh Feb 14 '20 at 02:09
  • yes, installed them globally.. same issue. The build was actually successful, it is just that the html report is not generated so when I look at the page for the report, it gives a 404 error, not found – Max Feb 14 '20 at 04:30
  • What's your output for `npm ls` in jenkins ? – tinker Feb 14 '20 at 05:30

1 Answers1

0

The solution was as follows:

1.- Look for the folder: C: \ Program Files (x86) \ Jenkins \ tools \ jenkins.plugins.nodejs.tools.NodeJSInstallation \ Node3 \ node_modules

** Node3 may vary the name you assigned in Jenkins.

2.- Copy and paste newman and newman-reporter-htmlextra on the folder and try again.

Basel Issmail
  • 3,847
  • 7
  • 20
  • 36
Danzig
  • 16
  • 1