Search code examples
htmljenkinsnewman

html extra works in cli, but not in Jenkins


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??


Solution

  • 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.