POSTMAN BEGINNER TUTORIAL 16 💡 Run Collections Remotely with URL

  Рет қаралды 78,370

Automation Step by Step

Automation Step by Step

Күн бұрын

website - automationstepbystep.com/
Today we will learn:
1. How to get Collection URL
2. How to run Collection remotely (from anywhere) using collection url
Step 1 : Get your collection url
Step 2 : Get Newman and run with command
newman run "url"
________________________________________________________________
POSTMAN Beginner Tutorials - • POSTMAN BEGINNER TUTOR...
Playlists - / @raghavpal
SUBSCRIBE - / automationstepbystep
_______ ONLINE COURSES TO LEARN _______
Visit - automationstepbystep.com/

Пікірлер: 64
@doriantdjeumo9376
@doriantdjeumo9376 4 жыл бұрын
Thanks for these videos; Perfect !
@RaghavPal
@RaghavPal 4 жыл бұрын
You're welcome Doriant
@riteshkumar6403
@riteshkumar6403 5 жыл бұрын
Excellent. Very informative video.
@RaghavPal
@RaghavPal 5 жыл бұрын
Happy to know this Ritesh
@mmakvana11
@mmakvana11 3 жыл бұрын
Great Thanks. Explained very well.
@RaghavPal
@RaghavPal 3 жыл бұрын
Glad it was helpful Mukesh
@johng5295
@johng5295 4 жыл бұрын
Thanks in a million.
@RaghavPal
@RaghavPal 4 жыл бұрын
You're welcome John
@Madhavan2020
@Madhavan2020 4 жыл бұрын
Thanks a lot. Its very userful
@RaghavPal
@RaghavPal 4 жыл бұрын
You're welcome
@md.mahfuzulhuqtalukder6644
@md.mahfuzulhuqtalukder6644 4 жыл бұрын
Awesome, you are awesome and best.
@RaghavPal
@RaghavPal 4 жыл бұрын
So happy to see this message Md.Mahfuzul. Share your knowledge with all
@skatskau1102
@skatskau1102 5 жыл бұрын
Thank you bro!
@RaghavPal
@RaghavPal 5 жыл бұрын
You're welcome
@erickalcantara7574
@erickalcantara7574 3 жыл бұрын
Thank you very much
@RaghavPal
@RaghavPal 3 жыл бұрын
You're welcome Erick
@Youtooobo
@Youtooobo 2 жыл бұрын
Автор видео - ты учитель от бога, спасибо тебе!
@RaghavPal
@RaghavPal 2 жыл бұрын
Наиболее желанный
@gsVerka
@gsVerka 4 жыл бұрын
Hello Raghav, your tutorials are FANTASTIC. I have watched postman series on other two learning platforms as well, but the content you have delivered, is clean, easy, and just awesome. I am watching your python series on udemy these days :) I have one question related to this video though: the amazonaws you have used, is it something Desktop as a service (Daas) you have purchased? I am interested to know. If there is some reference article which you can refer me to read as I would like to use "vdi" one day (for personal use). Thank you for your teaching.
@RaghavPal
@RaghavPal 4 жыл бұрын
Hi, glad to know this you can find all here - automationstepbystep.com/ It is an AWS windows EC2 and is paid. You can goto aws.amazon.com sign up and then get an ec2 machine as required
@gsVerka
@gsVerka 4 жыл бұрын
@@RaghavPal I'll check. Thank you.
@manpreetkour9020
@manpreetkour9020 4 жыл бұрын
Raghav, do you have videos made for api testing in karate framework ? Can you make those or if you already have, please share link. That would be a great continuation of postman . Thank you and keep up the great work
@RaghavPal
@RaghavPal 4 жыл бұрын
Hi Manpreet, not yet on Karate, will do
@roshanpimple17
@roshanpimple17 5 жыл бұрын
@Raghav: if there are secured webservices , it will get saved on postman site, right ?
@RaghavPal
@RaghavPal 5 жыл бұрын
Hi Roshan, there should be no data saved from website, it saves your test
@abhishekthomas7799
@abhishekthomas7799 4 жыл бұрын
Hi Raghav, If we update the contents/data of the collection, will the collection url still work with the updated changes?
@RaghavPal
@RaghavPal 4 жыл бұрын
Hi Abhishek, yes it should work with the url. Pls try
@elmariscal5394
@elmariscal5394 4 жыл бұрын
Hi raghav, I have a collection with 2 requests and both are pointing to a "url" variable within the collection itself. If i run it from postman ide, the result is ok but sth is wrong and happened when running from command line when i got the link to run it remotely, is there a configuration that i have to do to say that it is needed that "url" variable within the collection? do i have to export something?
@RaghavPal
@RaghavPal 4 жыл бұрын
Hi Franco, where is the url variables stored. If your collection uses environment variables, To provide an accompanying set of environment variables, export the template from Postman and run them with the -e flag newman run www.getpostman.com/collections/id -e environment.json github.com/postmanlabs/newman/issues/1336
@manpreetkour9020
@manpreetkour9020 4 жыл бұрын
Raghav, one quick question. How to upload these collections to github and run through Jenkins ? Please share a video showing that.. nice work with rest of the videos
@RaghavPal
@RaghavPal 4 жыл бұрын
Hi Manpreet, there is a video in this series, You basically will need to get the newman command. Also you can find a complete series on Jenkins here - automationstepbystep.com/
@Scooterboy_and_others109
@Scooterboy_and_others109 5 жыл бұрын
Running "Newman" on remote server using the URL, hope it will validate all authentications. Correct?
@RaghavPal
@RaghavPal 5 жыл бұрын
Yes, it should work as setup
@amrutawaghmare872
@amrutawaghmare872 4 жыл бұрын
My collection uses some data file and variables. How can newman know about that? When I run using newman it fails as it cannot find any variables / data file
@RaghavPal
@RaghavPal 4 жыл бұрын
Hi Amruta, you can use -d flag and provide location of your csv or json file $ newman run mycollection.json -d data.json Steps to run test cases from command line :- • Open CMD • Now reach to the folder where your JSON are saved • Now hit command as below newman run Test_Collection.postman_collection.json -e Environment.postman_environment.json -g globals.postman_globals.json -d demoData.csv -reporters cli,html In above command -e represents environment variable, -g global variable, -d csv data file name, -reporters cli,html represents output as console and html reports. www.cuelogic.com/blog/postman-tutorial-for-automation
@palakpatel9171
@palakpatel9171 4 жыл бұрын
I tried running the same by creating a job in JENKIN. I am getting this error: 'newman' is not recognized as an internal or external command, operable program or batch file. I set up System variable NODE_PATH to C:\Users\Administrator\AppData\Roaming pm ode_modules and C:\Users\Administrator\AppData\Roaming pm as well but still it is not working. Could you suggest what else should I do?
@RaghavPal
@RaghavPal 4 жыл бұрын
Hi Palak, Pls check if the path for newman is added in your Path environment variable Open Control Panel -> System and Security -> System -> Advanced System Settings -> Environment Variables In "User variables" or "System variables" find variable PATH and add node.js folder path as value. (DO NOT DELETE EXISTING VALUES) Usually it is C:\Program Files\Nodejs;. If variable doesn't exists, create it. Restart your IDE or computer. ----------- stackoverflow.com/questions/51381299/npm-package-error-newman-is-not-recognized-as-an-internal-or-external-command
@palakpatel9171
@palakpatel9171 4 жыл бұрын
@@RaghavPal Thanks Raghav. It worked.
@narendrareddy2257
@narendrareddy2257 4 жыл бұрын
hi sir, after complete the newman installation by command line. i am trying to run my collection URL through remotely but getting in cmd "newman is not recognizing internal or external file". do i have to set any path for newman?
@narendrareddy2257
@narendrareddy2257 4 жыл бұрын
@Usman Rafiq yes, i have already installed with that command that was got version "@newman 4.5.5" even though getting same ----not recognized. please help me
@RaghavPal
@RaghavPal 4 жыл бұрын
Hi Usman, Pls check if the path for newman is added in your Path environment variable Open Control Panel -> System and Security -> System -> Advanced System Settings -> Environment Variables In "User variables" or "System variables" find variable PATH and add node.js folder path as value. (DO NOT DELETE EXISTING VALUES) Usually it is C:\Program Files\Nodejs;. If variable doesn't exists, create it. Restart your IDE or computer. ----------- newman' is not recognized as an internal or external command,
@RaghavPal
@RaghavPal 4 жыл бұрын
Thanks for the help Usman
@sriram8719
@sriram8719 5 жыл бұрын
Hi Raghav, I am facing 'error: connect ETIMEDOUT xx.xx.xxx.xx:xxx' when I try to run Newman with url. The same collection runs fine when I export the collection.JSON to my local and run from cli. Basically Newman runs the .JSON file but gives the above error while I try to run the collection url. Please help. Thanks!
@RaghavPal
@RaghavPal 5 жыл бұрын
Hi Sri Ram, are you behind any proxy or vpn
@sriram8719
@sriram8719 5 жыл бұрын
@@RaghavPal Yes Raghav.
@sriram8719
@sriram8719 5 жыл бұрын
@@RaghavPal Yes I am behind proxy. Is there any settings I can do to run my collection url?
@hassanlone7455
@hassanlone7455 Ай бұрын
hi all, sir its look like when we share collection and run it remotely it does not use variables declared on environment level. So we have to define all environment variables as collection variables otherwise it will throw error or will not pass tests if those variables are used in them.
@hassanlone7455
@hassanlone7455 Ай бұрын
or export enviornment as json and run with -e env.json
@RaghavPal
@RaghavPal Ай бұрын
Hassan Let's break down the issue and solution step by step: Issue: * You're using Postman for API testing * You're trying to run your collections remotely * When you share a collection and run it remotely, it doesn't use variables declared at the environment level * This causes errors or test failures when those variables are used in the tests Reason: * Environment variables are specific to the local Postman instance and are not automatically shared when running collections remotely. * Remote runs don't have access to the environment variables defined in your local Postman instance. Solution 1: Define environment variables as collection variables * Instead of defining variables at the environment level, define them as collection variables. * This way, the variables will be part of the collection and will be available when running the collection remotely. Solution 2: Export environment as JSON and run with -e env.json * Export your environment variables as a JSON file using Postman's "Export" feature. * When running the collection remotely, use the `-e` flag followed by the path to the exported JSON file (e.g., `env.json`). * This will allow the remote run to use the environment variables defined in the JSON file. Example command: ``` newman run -e env.json ``` Replace `` with the actual ID of your collection, and `env.json` with the path to your exported environment variables JSON file. By using one of these solutions, you should be able to successfully run your collections remotely with the environment variables available -
@ChatGPTtest-tp3vi
@ChatGPTtest-tp3vi 2 ай бұрын
Hi Raghav, I could see the assertion errors in your video at the middle of the execution and I am getting the same error. Its because of the use of the variables from the data files. Can you please help here by explaining how can we make use of the data files here ? Is there any way by which we can share the data files along with the collection URL so that there are no errors at all? What is the command for the same? Thanks a lot. Binita
@RaghavPal
@RaghavPal 2 ай бұрын
Binita When running Postman from the command line, you can manage variables using Newman, which is Postman's command-line collection runner. Here's how you can do it: 1. Environment Variables: Export your env in a file. You can pass an environment file using the `-e` or `--environment` flag. For example: ``` newman run collection.json -e environment.json ``` In the `environment.json` file, you can define your variables and their values. 2. Data Variables: If your variables are coming from data files, you can use the `-d` or `--iteration-data` flag to specify a data file. For example: ``` newman run collection.json -d data.json ``` In the `data.json` file, you can define your variables and their values. 3. Global Variables: You can also set global variables using the `-g` or `--globals` flag. 4. Setting Variables in Scripts: Inside your Pre-request and Test scripts in Postman, you can set environment and global variables using the `pm.environment.set` and `pm.globals.set` functions³. For example: ``` pm.environment.set("variable_key", "variable_value"); ``` Remember to replace `collection.json`, `environment.json`, and `data.json` with your actual file paths. Also, replace `variable_key` and `variable_value` with your actual variable names and values. I hope this helps
@ChatGPTtest-tp3vi
@ChatGPTtest-tp3vi 2 ай бұрын
@@RaghavPal Thank you for the solution Dada. But will this work if I am running the collection URL remotely instead of the running it using newman in command line?
@RaghavPal
@RaghavPal 2 ай бұрын
you should have newman and should export the required files on the system where you are running the command
@ChatGPTtest-tp3vi
@ChatGPTtest-tp3vi 2 ай бұрын
@@RaghavPal thank you so much. :)
@tulasibakkireddy7137
@tulasibakkireddy7137 4 жыл бұрын
Hii sir when iam trying to install newman through cmd prompt,it says mom not recognised internally or externally.
@RaghavPal
@RaghavPal 4 жыл бұрын
Hi Tulasi, sorry for late reply, what is mom here, is it npm. may be you have not installed node js or env variables for node not set on the system
@tulasibakkireddy7137
@tulasibakkireddy7137 4 жыл бұрын
@@RaghavPal yes sir,I didn't install node js
@jayasaini8171
@jayasaini8171 4 жыл бұрын
Hello, I am facing an error- " AssertionError: expected false to be truthy". Script --> tests["Value of email id"] =responseBody.has(data.id); tests["Password value"] =responseBody.has(data["pass"]); (Data stored in .json file.) Run-> .json file upload-> run the collection Getting error in results - " AssertionError: expected false to be truthy". Can anyone help ?
@RaghavPal
@RaghavPal 4 жыл бұрын
Hi Jaya, have you checked if the variable names are correct and there is no type or spaces, Also try to debug kzfaq.info/get/bejne/pMthhdaKyM3Pg40.html This may also help - stackoverflow.com/questions/54352177/postman-test-failure-false-to-be-truthy
@jayasaini8171
@jayasaini8171 4 жыл бұрын
@@RaghavPal Thank you , I will check the same. One more think which i wanted to share, The tutorial is very helpful for a beginner(Like me 😊). Is thr any other deatiled tutorial shared by you in the same topic. If yes, please share with us. Thank you -Jaya
@valk9819
@valk9819 5 жыл бұрын
You have here 404 codes. It seems like your code work properly. Problem
@RaghavPal
@RaghavPal 5 жыл бұрын
Hi Val, pls give details, what part of the video are you referring.
POSTMAN BEGINNER TUTORIAL 17 💡 How to run SOAP requests
7:28
Automation Step by Step
Рет қаралды 236 М.
Learn Postman in 15 Minutes
15:20
TomDoesTech
Рет қаралды 29 М.
Secret Experiment Toothpaste Pt.4 😱 #shorts
00:35
Mr DegrEE
Рет қаралды 38 МЛН
A teacher captured the cutest moment at the nursery #shorts
00:33
Fabiosa Stories
Рет қаралды 55 МЛН
НЫСАНА КОНЦЕРТ 2024
2:26:34
Нысана театры
Рет қаралды 1,5 МЛН
Newman Postman: How to Run Postman Command Line.(With Demo)[Ultimate Guide]
13:11
How To Integrate Postman with Github and Execute from Jenkins
26:22
Mukesh otwani
Рет қаралды 19 М.
Run Postman Collections in Jenkins with Newman
35:35
Valentin Despa
Рет қаралды 20 М.
How to write API test cases in Postman using JavaScript
15:45
Naveen AutomationLabs
Рет қаралды 87 М.
School Of Basics | What is an API | API testing interview questions
7:58
Automation Step by Step
Рет қаралды 428 М.
Postman Tutorial #7 - HTTP Methods GET and POST in Postman
13:18
Software Testing Mentor
Рет қаралды 43 М.
What Makes A Good Cli Tool | Prime Explains
4:26
ThePrimeTime
Рет қаралды 60 М.
Swift API Calls for Beginners (Networking) - Async Await & JSON
25:35
Secret Experiment Toothpaste Pt.4 😱 #shorts
00:35
Mr DegrEE
Рет қаралды 38 МЛН