Great Video, Thanks for sharing. I am using both Environment and Collections. In Environment I am storing also some variable (like baseUrl).In this case, I still get similar to invalid URL (see in video 11:10) Could you please explain how to assign variable from environment when running newman, to be able to run successfully? - Thank you
@@vdespa can you please make a video about using newman with a testing framework like xunit and Selenium? I tried using Edge.js to script nodejs from C# but it didn't work. I'm getting error due to newman script using spread operator.
Very great video. Could be useful if you link it with deploy pipeline in Jenkins. I believe to automate the API test we should set the latest build for the environment
Thank you very much Valentin for all your clear explanations: I was interested in doing this in a docker container but i do not manage to create container with jenkins + newman, it fails. i have used the docker image weareathlon/jenkins: do you have an other docker image already build to advice ? I think you are doing this in your udemy course, but i am not sure. Do you give any personnal help for a french lady ?
Hi Valentin, Thanks for the tutorial. This is really helpful. If I want to run the Postman collection on some cloud based K8 setup through jenkins, the installation of newman and html report would be on my laptop or on the cloud setup? Also the collection has an environment (as a setup), how should I configure all this with jenkins. Please reply
Everything that you need need to be available to your Jenkins installation where Jenkins is running. Having stuff installed on your computer would not make sense.
Hi, Thanks for the tutorials, Its really helpful. I have 1 query. Is it possible to run a collection that has secret keys as variable in environment without exposing it from jenkins? We are planning to run postman collection file stored in bitbucket via jenkins but in that case I have to export password containing environmental variables too
how to run multiple collections from newman? do we need to write a for loop that iterates through the folder containing the json files? if so , can you pls share that logic as well?
Hi Valentina Despa, If i have any external file which has request body for only one of the request in the collection and i need to run only that particular api request with external file and other api request in the collection with what ever request body which is specified in the request body, What should be the solution for the same? Thanks in Advance.
It is hard to answer this with the given information. Join the Discord community (see link in the description) and ask your question there. Consider adding more details, including screenshots. Thanks for understanding.
i have client id and password which i am passing through environment.json and able to execute it through postman but my requirement is how to automate through jenkins pipeline without commiting my password to gihub and run through the pipeline?
newman run \users\projects\apitesting\api_testing.postman_collection.json -g \Users\projects\apitesting\Documentintake_sanbbox.postman_environment.json --global-var "Username={{Username}}" --global-var "Password={{Password}}" -- trying like this but somehow usename/password not getting and unable to generate secure token to hit the endpoint
I am using this command ( "newman run $PostmanCollection -d $JsonBodyRequest.txt) and work successfully for the Post Requests and it worked very good. but since I need the response back, I want to use it with node, but I don't know how to send the file $JsonBodyRequst.txt to the same Collection? please help
Want to have ME be your Postman teacher? 🤔
Here's how: vdespa.com/courses/
This is amazing! Thank you so much Valentine for sharing your quality knowledge with us 🚀
You are welcome. Thank you for leaving a comment.
Really awesome video, was helpful. Valentin Despa Thanks for sharing.
Glad it was helpful! You are welcome. Thank you for leaving a comment.
Great Video, Thanks for sharing.
I am using both Environment and Collections. In Environment I am storing also some variable (like baseUrl).In this case, I still get similar to invalid URL (see in video 11:10)
Could you please explain how to assign variable from environment when running newman, to be able to run successfully? - Thank you
Fantastic... I found it so useful...
Glad to hear that. I am glad that it was helpful.
@@vdespa can you please make a video about using newman with a testing framework like xunit and Selenium? I tried using Edge.js to script nodejs from C# but it didn't work. I'm getting error due to newman script using spread operator.
@@TarekFaham Not sure how to integrate that. Newman only works with Postman collections for testing.
Very great video. Could be useful if you link it with deploy pipeline in Jenkins. I believe to automate the API test we should set the latest build for the environment
Thanks for your thoughts. You are welcome. Thank you for leaving a comment.
Thank you very much Valentin for all your clear explanations: I was interested in doing this in a docker container but i do not manage to create container with jenkins + newman, it fails. i have used the docker image weareathlon/jenkins: do you have an other docker image already build to advice ? I think you are doing this in your udemy course, but i am not sure. Do you give any personnal help for a french lady ?
Try this image vdespa/newman
Hai this is very helpful how can i access the global variable and how can i access the run time collection setted collection variable to another api
Could you share the collection please to practise
If i want to pass multipartfile as parameter in request how to make sure that jenkins takes that file during build?
Hi Valentin, Thanks for the tutorial. This is really helpful.
If I want to run the Postman collection on some cloud based K8 setup through jenkins, the installation of newman and html report would be on my laptop or on the cloud setup? Also the collection has an environment (as a setup), how should I configure all this with jenkins. Please reply
Everything that you need need to be available to your Jenkins installation where Jenkins is running. Having stuff installed on your computer would not make sense.
Hi, Thanks for the tutorials, Its really helpful.
I have 1 query. Is it possible to run a collection that has secret keys as variable in environment without exposing it from jenkins?
We are planning to run postman collection file stored in bitbucket via jenkins but in that case I have to export password containing environmental variables too
You can use secrets in Jenkins and pass them to Newman from the CLI. Would this help?
@@vdespa Thanks for the reply but how to pass that in newman command any reference link you have? :)
Hi despa when we run apis in postman it's working fine when I run apis in new man all apis got failed can u plz help me on this
CreateProcess error=2, The system cannot find the file specified, now
how to run multiple collections from newman? do we need to write a for loop that iterates through the folder containing the json files? if so , can you pls share that logic as well?
Yes, you can write a loop that does that. It is not clear why you need this in the first place.
@@vdespa simply to be able to run more of them without manually having to edit it each time! if you can help here that will be great!!
thanks
Hi Valentina Despa,
If i have any external file which has request body for only one of the request in the collection and i need to run only that particular api request with external file and other api request in the collection with what ever request body which is specified in the request body, What should be the solution for the same?
Thanks in Advance.
It is hard to answer this with the given information. Join the Discord community (see link in the description) and ask your question there. Consider adding more details, including screenshots. Thanks for understanding.
i have client id and password which i am passing through environment.json and able to execute it through postman but my requirement is how to automate through jenkins pipeline without commiting my password to gihub and run through the pipeline?
Is this issue resolved? I have similar issue
The latest changes to Postman tests don't reflect in Newman?
From where does Newman read the collection?
@@vdespa I change a few things in the collection for example adding 1 request, then if I run Newman again, will the results update to the new change ?
@@dailylife1504 Depends from where you are reading the collection.
Спасибо
Hi Valentine Despa,
I'm getting the "Assertion error" when I run my script using newman, I also used environment for the same .
│ executed │ failed │
├─────────────────────────┼─────────────────────┼─────────────────────┤
│ iterations │ 1 │ 0 │
├─────────────────────────┼─────────────────────┼─────────────────────┤
│ requests │ 12 │ 0 │
├─────────────────────────┼─────────────────────┼─────────────────────┤
│ test-scripts │ 24 │ 1 │
├─────────────────────────┼─────────────────────┼─────────────────────┤
│ prerequest-scripts │ 14 │ 0 │
├─────────────────────────┼─────────────────────┼─────────────────────┤
│ assertions │ 42 │ 42 │
You may need to generate the HTML report and see why the test fails.
Hi @vdespa I'm getting this error
error: EROFS: read-only file system, mkdir '/newman'
newman run \users\projects\apitesting\api_testing.postman_collection.json -g \Users\projects\apitesting\Documentintake_sanbbox.postman_environment.json --global-var "Username={{Username}}" --global-var "Password={{Password}}" -- trying like this but somehow usename/password not getting and unable to generate secure token to hit the endpoint
I am using this command ( "newman run $PostmanCollection -d $JsonBodyRequest.txt) and work successfully for the Post Requests and it worked very good. but since I need the response back, I want to use it with node, but I don't know how to send the file $JsonBodyRequst.txt to the same Collection? please help
You need to look into how to read environment variables in a Node.js script.