Part 18(POSTMAN): How to fix "newman is not recognized" error || Could not find "htmlextra" reporter

Опубликовано: 17 Октябрь 2024
на канале: Sachin Gupta
6,544
84

Part 18(‪@postman‬ ): How to fix "newman is not recognized" error | Could not find "htmlextra" reporter

If you have installed Jenkins via installer and you are getting 'newman' is not recognized as internal or external command error OR Could not find "htmlextra" reporter, follow below mentioned 3 points:-
1: Add Node JS plugin
2: Go to Manage Jenkins -- Global Tool Configuration -- NodeJS section(Click on add NodeJS and add name as NodeJS and add command "newman newman-reporter-htmlextra" (in Global npm packages to install section)
3: Go to Job -- Configure -- Build Environment (Select 'Provide Node & NPM bin and select NodeJS)

Note: If we are running Jenkins via .war file, then no need to install any plugins and node packages inside Jenkins, Jenkins will recognize all the plugins and packages automatically (please note: those packages must have been installed in ur system via command prompt)

New Batch Command: newman run "User Details.postman_collection.json" -e "Dev Env.postman_environment.json" --reporters cli,junit,htmlextra --reporter-junit-export Newman_Junit.xml --reporter-htmlextra-export Newman_HTML_Report.html


Old Batch Command:
cd C:\Users\Admin\AppData\Roaming\npm\node_modules\newman\bin
node newman run "C:\Postman Collection\User Details.postman_collection.json" -e "C:\Postman Collection\Dev Env.postman_environment.json" --reporters cli,junit,htmlextra --reporter-junit-export "C:\Windows\System32\config\systemprofile\AppData\Local\Jenkins\.jenkins\workspace\Postman\Newman_Junit.xml" --reporter-htmlextra-export "C:\Windows\System32\config\systemprofile\AppData\Local\Jenkins\.jenkins\workspace\Postman\Newman_HTML_Report.html"

Please watch previous tutorials, in case if you have missed them, and subscribe to this channel.

POSTMAN Tutorial Series
**********************************************
   • POSTMAN TUTORIAL  

Selenium 4 Features
**********************************************
   • Selenium 4 Feature  

API Testing using by Rest-assured library
**********************************************
   • API Testing using by Rest Assured Lib...  

Extent Report
**********************************************
   • 𝗥𝗲𝘀𝘁 𝗔𝗣𝗜 𝗔𝘂𝘁𝗼𝗺𝗮𝘁𝗶𝗼𝗻 𝘂𝘀𝗶𝗻𝗴 𝗯𝘆 𝗥𝗲𝘀𝘁-𝗔𝘀𝘀...  

Builder Pattern
**********************************************
   • 𝗛𝗼𝘄 𝘁𝗼 𝘂𝘀𝗲 𝗕𝘂𝗶𝗹𝗱𝗲𝗿 𝗣𝗮𝘁𝘁𝗲𝗿𝗻?  

GIT Repository: https://github.com/sachinguptait/Sele...
Facebook Group:   / 2281575021954417  
LinkedIn Group:   / 10311201  
Telegram Group: https://t.me/joinchat/ONh25RUYqfBjsCt...