Closed UA55 closed 6 years ago
@UA55 Could you complete the provided issue template? It'll help us resolve your issue faster 😄
What details am I missing?? Node Js verison : 10.1.0 npm version: 5.6.0 I am using Postman installed on my desktop and not the google chrome extension. Let me know if you need any additional details
@UA55 Thanks for sharing those details, could you also go through the following?
npm i -g newman
(This might require you to open up a command prompt/PowerShell terminal in Administrative mode).where newman
? This will return the path of the global Newman install.console.log(pm.environment.toObject());
to the test/pre-request script code and confirm that the environment variables are not being resolved, even with the -e env.json
flag passed to Newman?I delete d the newman package from ....appData/Roaming/npm and then installed using npm i -g newman again. It installed successfully and update 194 packages but when I did where newman it says could not find files for given pattern (s). Do I need to add the question mark too? Passing with the environment variables is resolved actually there was the self certificate issue which got resolved by adding -k. So I guess my on;y question remaining is that I am running this node.js cmd, can you please help me get this run through normal cmd
@UA55 No, the question mark was not needed. Could you go through the solution described here: https://stackoverflow.com/questions/23860262/npm-global-install-does-not-add-packages-to-path-on-windows-8-1? There are known issues where globally installed npm
modules would not become instantly usable in Windows.
Hey @UA55, is this issue still occurring for you?
@UA55 Closing issue due to inactivity, feel free to revert if you're facing difficulties 😄
i am working on windows 10, i am not able to Postman request commands into Jenkins,these commands are wokring fine on cmd prompt. sending my commands and errors: Here i am posting build and error plz help. C:\Users\MY\Desktop\Export collection newman run collection1.postman_collection.json Error: FailedConsole Output Started by user ravi kumar Running as SYSTEM Building in workspace C:\Program Files (x86)\Jenkins\workspace\PostmanCollectionRequest [PostmanCollectionRequest] $ cmd /c call C:\WINDOWS\TEMP\jenkins3008023594651108106.bat
C:\Program Files (x86)\Jenkins\workspace\PostmanCollectionRequest>C:\Users\MY\Desktop\Export collection 'C:\Users\MY\Desktop\Export' is not recognized as an internal or external command, operable program or batch file.
C:\Program Files (x86)\Jenkins\workspace\PostmanCollectionRequest>newman run collection1.postman_collection.json
'newman' is not recognized as an internal or external command,
operable program or batch file.
C:\Program Files (x86)\Jenkins\workspace\PostmanCollectionRequest>exit 9009 Build step 'Execute Windows batch command' marked build as failure Finished: FAILURE Thanks
having same error
Same error. Have tried all kinds of Re-installs. No solution. Please advise if anyone has anything that works. Thanks!
My solution was like this: 1) try to execute from Jenkins commands like:
node -v
npm -v
newman -v
in case something missing just install it, for example npm install newman
or npm install -g newman-reporter-htmlextra
if everything works fine go to the next step otherwise try to figure out what's wrong
2) In Jenkins specify workspace to your project https://prnt.sc/s5d0ab 3) add Windows batch command https://prnt.sc/s5d20b
Tips(if something not working):
Install 'NodeJS Plugin' thru Jenkins plugins > restart Jenkins after installation > add configurations
Set 'system envintoment variables' for: {code}Variable: NODE_PATH Value: C:\Users\name\AppData\Roaming\npm\node_modules <- path to your npm folder Variable: PATH VALUE: C:\Program Files\nodejs -> path to nodejs{code}
In Jenkins job configuration -> go to Build Environment Provide Node & npm bin/ folder to PATH
I am having troubles running newman on my Windows CMD. I copied my folder path successfully but the error says the requested file in my folder cannot be found. I am trying to run my exported postman collection and exported postman environment. Please help
First of all I tried to run the newman from the cmd but it didnt work (newman’ is not recognized as an internal or external command, operable program or batch file..) I tried all possible solutions and it doesn't seems to work. so now I am using the node.js cmd and my collections seems to be running atleast but they are not recognizing my environment variables even when I export the environment file in the same location as my collection and give the following command: newman run test.json -e env.json -r html,cli,json,junit I passed several requests and the ones that had environment variable failed instantly but the ones which didnt passed and the test scripts ran just fine.
I guess I need help with figuring out how to get my collection with environment variables and my test scripts (with Parsing and passing those variables in the chained request format) run in the node.js cmd and get the reports generated. Please help!