This video series was AMAZING! So organized, so professional, so easy to understand! The way you explain things is perfect. Other videos skip so many important details. Covered all the major areas of PostMan, including how to automate it with newman/Jenkins. Thank you so much!
Thanks Raghav for knowledge sharing! I had the same problem at first - each iteration showed the same body. So my little advice, for those who have this struggle - make sure that the name of the global variables (endpoint, email, password) are equal to those names you use in your JSON file and in a body of your request you run.
Your Video content is really good and I liked it. I have generic Question- When we use Headers? and how we will know we have to use Header in anycase? kindly clarify me. Thanks in advance.
Hi Balkrishna, in general we provide headers on content-type and accep. This is to tell the server the type of content we are sending like XMl, JSON etc and the format that we want to accept XML, JSON etc. Apart from this any other authentication and headers if you need to add should be given to you from the owners of the api or the dev team
I have started learning POSTMAN tool using this video only... The way u explain is very clear and understandable... Thanks a lot Raghav🙏🙏. Keepup ur work.. it's very informative..
As usual very detail and informative. Being a postman user myself, even I learned a couple of things. Great tutorial, keep them coming :) P.S. If you can improve the sound of the videos in upcoming series would be a great. thanks
This is amazing video, could please explain if we have multiple request and every request i need to pass different data, how can we do this because right now for every request i need to upload different file, so i just want can we upload one file, Pls help on this
Hi Vibhor, you can use a single file and add your data and in your requests add the variables accordingly, You can also set the iterations from Collection Runner
@@RaghavPal thanks for this, when i add the variable for the second request in same json file then the data for that second request does not appear in the preview, as the variable are different. Also when i add two arrays for two request in json then it only execute for two iterations and does not pick data and gets fail
@@RaghavPal Thanks for the reply, i think, i bit confuse to explain my problem, I have collection, that collection contains 7 different request, and I have to pass different data for every request, Few Steps - 1) open runner 2) select the collection (when i select the collection the all 7 request selected, Now if i want to run all 7 request so how can i do it because if i am uploading json/.csv file (this file contains only request 1 data) in the runner, other (2nd to 7th request) are fail. So my problem is how can prepare .csv / json for all 7 request in the single file or there is another way we can run continuous all request through one file (but all request have different data) Again thanks you for the reply
great video . Thank you Raghav ! Please help me with few questions: 1 - Do we have a similar process of data-driven if we use SOAPUI , pls share video if you have SOAP UI link for same concept 2- What coding language did you use in tests and do you have a video of that coding language? 3- What level of expertise is needed on that coding language to support API testing for a QA. 4- One of my colleagues demoed a similar concept for REST through SOAP UI but that was too complex like importing library and then writing a long code to read excel data cell and then passing that value to the env variable but yours is far easier..what is it so? Does SOAP UI tool need a lot of additional dependencies to read data from xls /csv ? . Please share the video for SOAPUI Vs POSTMAN diff in this context ... Sorry for so many questions but I'm eagerly waiting for a response! Thank you for all your great work !!
Hi Abhi, 1. You can check SoapUI tutorials here automationstepbystep.com/ and here automationstepbystep.com/udemy-discounts/ 2. Its JavaScript, You can find beginner tutorials on the above link 3. Basic and OOP will be good 4. with SoapUI free ver you will need to do a lot of custom things
Hi Raghav, These are excellent videos and you are really helping people learn things easily and quickly. Could you share some detail on how can we get inputs from DATABASE JDBC connection in postman?
Hi Raghav. Thanks for the video. Can you post video on how to get data from database to our request body in postman. It would be really helpful. Thank you.
Very informative videos. Good work. A simple query, at 15:05, responsebody.has(). This will look for "some value" in response body irrespective on the key under which that value is present, right?
Hi Raghav, Your tutorial is really informative and very helpful too. I have couple of question regarding Data driven testing in Postman 1. Is there any way we can do a SQL/Oracle query and retrieve data using postman 2. Also is there any way we can compare DB extract with an API response Thanks in advance.
HI Rakesh, In POSTMAN there is no out of the box feature to query db. Having API to interact with DB is one option. Read this blog.getpostman.com/2018/02/09/read-and-write-to-rest-enabled-databases/ github.com/postmanlabs/postman-app-support/issues/2185
Hi Pooja, yes, we can, you can also use global variables 1. Scope- Environment variables can be accessed with the corresponding environments. Global variables can be accessed broadly regardless of the selected environment. 2. Priority : priority is as follows: - local - data - environment - collection - global So in case a global variables shares same name with an environment variables, at runtime value will be referenced from env variable 3. Getting & Setting variables through scripts - Global - pm.globals.set() - pm.globals.get() - Env - pm.environment.set() - pm.environment.get() learning.getpostman.com/docs/postman/environments_and_globals/intro_to_environments_and_globals/ pm.variables is for local variables for e.g. pm.variables.set("variable_key", "variable_value"); Local variables are temporary values you set in your request scripts. Also //access a variable at any scope including local pm.variables.get("variable_key"); //access a global variable pm.globals.get("variable_key"); //access a collection variable pm.collectionVariables.get("variable_key"); //access an environment variable pm.environment.get("variable_key");
Thanks for the detailed explanation. Can we write a pre request script to upload an image as binary in the Body of the request? I have an api in which I upload the image binary in the body before sending the request. I'm trying to validate this through script. Could you please guide me how to write the script for this. Thank You.
Hey Raghav, could you plz let me know how can we use data files if we want to run entire collection which has multiple requests and needs multiple files. Thanks in advance...& BTW video was super informative and helped me a lot. Thanks for that buddy!!
Hi Saumil, 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
Hi Khaled, 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
Hi Raghav, i went through all of ur videos.. I have some questions.. 1. Do we have an option to write back the response we get to the csv file..? If so how can it be done.. 2. Can we create multiple requests from the data we have stored in the csv file? Please let me know how can it be done as soon as possible. Thanks in advance 😊
Hi Megha, 1. You can do, will need to add scripts 2. Yes we can, again it will depend how you have setup your request on postman. You can refer variable values from csv file, so whereever you need you can add variables and then put the value in csv. Any complex operation may require scripting
@@RaghavPal Thank u so much raghav this helped details helped me a lot.. Do you have any video that helps us to write back the response. If so can u please share it😊
I kept having "Response body was not logged" message after running the collection - turns out now you have to put checkmark against "Save responses" field before clicking Run the collection.
Thank you so much. Your all video tutorials are best for learning. Once again I want to say you are the best. I have one question, what is the benefit of creating the variable in Global?
Thanks for the kind words Mahfuzul. The global variables can be used across collections. Basically the diff is in scope and priority and you can use as per your needs. The diff is as follows: 1. Scope- Environment variables can be accessed with the corresponding environments. Global variables can be accessed broadly regardless of the selected environment. 2. Priority : priority is as follows: - local - data - environment - collection - global So in case a global variables shares same name with an environment variables, at runtime value will be referenced from env variable
Hi Raghav, Thank you for making this series. These videos have been really helpful. For one of my project I am using an external data set(CSV File) for iterations. Is it possible to run a collection which is using a CSV or JSON file as an external data set through Newman? If yes, can you please explain that. Thank You
Hi Shubham, Yes you can. 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
Hi Raghav, First of all, thanks for such an informative tutorial on API Testing using Postman, One more favour needed, could you pls upload some advanced level tutorial on API testing using POSTMAN also API Interview QnA. Thanks in Advance Happy Quality Testing.
Hello Raghav, Thanks for all the excellent videos on POSTMAN. Could you please create a video for exporting responses body of all the request executed through data driven tests in collection runner. As of now, response from the collection runner is available to for viewing in Collection runner window. Thanks again. Jawad
Dear Raghav, Hope you are well, i have a question, if i can read from the collection runner preview (specifically the response) and past it to the equivalent values of the row in the CSV file as the actual result. Hope you can have some way to help me.
Hi Raghav, I like all of your videos, I regularly watch your video. You are doing great job. I have a question, as I am very new to POSTMAN, you have used few Syntax like "Responsebody.has" in Tests bar. What does this Syntax "Responsebody.has" means ? and where I will get the list of all Syntax with descriptions.
Hi Abbas, pls check if the api works without data driven, there can be some issue with reqres site, You can try other apis from here medium.com/swlh/fake-rest-apis-that-we-can-use-to-build-prototypes-2a7946704726
Hi ,Thank you for the detailed Video really saved my day. What if the I run a job in collection Run and I have 20 Iterations , I want to save the response body of all 20 Iterations to my local machine returned by the API. Is it possible?
A question from me: How come in your test script, you write for the email part (data.email) and for the password it's (data["password"]) ? I would it to be (data.password), matching the syntax of the email validation line. Otherwise thanks so much for these guides, very clear, concise, and helpful :) People like you make the world go 'round!
Hello Raghav, Thanks for the awesome video :) Can we add test data for more than one request in a single data file? Right now I can only add the data for one request in a one data file. Thanks
You can Sayali, you will have to use the variables accordingly. This will help community.getpostman.com/t/csv-data-files-for-multiple-requests-within-one-collection/819/2
Thanks for your quick response. Is there any link to describe the exact steps for this ? From the above link,it is not that clear how to do the same. Currently I am facing below issue. I have prepared the data for multiple requests in a single data file, provided the parameter/variable names are different in all the requests. Request 1 has parameter names as A,B,C and request 2 has P,Q and R. Prepared 3 different data sets for request one and three for request 2. After passing the data file, in the preview option I can see 6 datasets for request one and not for 2.
I have added the tests tab with the script but I am returned with fail status which says AssertionError: expected false to be truthy can I please know solution for this
Hi Soujanya, have you checked if the variable names are correct and there is no type or spaces, Also try to debug czcams.com/video/ne1RsYcgkSY/video.html This may also help - stackoverflow.com/questions/54352177/postman-test-failure-false-to-be-truthy
Instead of creating environment variables for each field in request body is there any way to pass the json from external and also can you make video on the same topic on Newman
Hi Vijay, you can refer the data from json and csv files and there is tutorial on that, Not sure if you can get the complete body and structure directly. Will need to check online
Hi Raghav, firstly very well done on the beginner tutorial - one question though: In testscripts section, should a global variable always be used? Can you use a local variable in there ? Thank you in advance for your response ^_^
Hi Kovila, you can use a script variable if he scope is only in that script. Global var should be used when you want to access them across project and env variables should be used when you want to use diff values for diff env.
Hello Raghav, I am able to achieve this without creating the Variables just in the request body pass your keys Eg."{{name}}" and run the collection with JSON and it will create the record.
Raghav, one question here. When you assign variables in a global env, and then refer the endpoint from that variable... like you did for the api/register/preprod with Endpoint. Should I be in the "No Environment" and execute ? or should I be in QA env and execute. Coz in each env, it gives different results.. pl explain
Hi Lowrence, I will suggest to be very honest in interviews, If you do not have the skills required for the job, you can try to get some basic knowledge before the interview and in the interview you can mention, that, "I did not get a chance to work on this in my job until now, but I have tried to get knowledge and exp on this on my own and I am eagerly looking forward to work on this technology. If given an opportunity, I am ready to learn and perform. I can also take out my personal time to learn the required skills before I join the job here." Experienced and genuine interviewers always appreciate honesty and are always ready to hire somebody who has the will to learn and perform on any duty.
@@RaghavPal My question was about Postman Raghav, one question here. When you assign variables in a global env, and then refer the endpoint from that variable... like you did for the api/register/preprod with Endpoint. Should I be in the "No Environment" and execute ? or should I be in QA env and execute. Coz in each env, it gives different results.. pl explain
Hi Lawrence, looks like I mixed up responses. Sorry for that. When you create env variables, you give name to your env. Now when you run your request you will need to select the env from the dropdown (top right) and only then the values will get referred from that env.
Hi, Raghav. thank you for these very useful videos. i am always enjoying learning from your channel. i have an question how to upload multiple objects from csv to postman. can you please help figure it out. thank you
Hi Naveen, both of these tools are good. Few things you can consider. 1. Both SoapUI and Postman have free and commercial versions 2. In Postman the free version has mostly all features and major difference is in terms of monthly calls, check here - www.getpostman.com/pricing 3. In SoapUI there are several features that are available as click and do in commercial versions, however in open source version you will have to add groovy scripts for the same. 4. Both these tools can handle REST well 5. In case of SOAP, SoapUI is better suited as of now. You can also watch my SoapUI tutorial which is on open source version here - czcams.com/play/PLhW3qG5bs-L-Bt9T_bnyflQ0Te4VgFhKF.html New videos will be added soon
Hello Raghav Pal, Thanks for these videos, i'm new to API testing and learned a lot from your videos. I do have a question, When we are passing invalid value through JSON or CSV then how do we write a validation for it? (I know we can write it in Test section) do you have any specific video which tells us how to do the validation or point me to your blog or any other blog which can help me?
Hi Nihal, so as you mentioned you can write a test for it, So test scripts will run after the test on response. Do you want to do something diff than this
Hello Raghav. I'm trying to write a scenario, i have a field which accepts only 10 character. var jsonData = JSON.parse(request.data); if (pm.expect(jsonData.criteria.carmodelInformation.carmodelName.length).to.be.below(11)) { pm.test("Valid Car Model Name is Passed", function () { pm.response.to.have.status(200); } ); } else { pm.test("Verification of Error Message in the response Body", function() { pm.response.to.have.status(400); } ); } My scenario is, if i enter more than 10 characters for the field then it fails. i get "There was an error in evaluating the test script: AssertionError: expected 15 to be below 11" error. error message. But when i enter less than 10 characters then scenario is passed. Is there a problem with script or can you please point me to where am i doing mistake. Thanks for the help.
@@RaghavPal but we are added preprod in the end of api like api/registers/preprod after that we replace it with endpoint...dats y m confused y added just after register.
HI, thank you for your awesome videos. They have helped me a lot for my new job. I was wondering if it was possible to do this with a variable in the header?
Hi Raghav - Please let me know how to do data driven for SOAP Request. Believe above is only for REST Call. I am looking to read input till End of file: for reach input call SOAP request and print response in a file. Please kindly share URL
@@RaghavPal Thanks for your reply. Gone through the video and not finding data driven for SOAP calls. Hearing that in post man , we cant do data driven for SOAP calls. Not sure if that is a correct statement. Please advise.
For sending response to a file, you can check this - stackoverflow.com/questions/46812596/saving-api-response-in-postman-to-a-file#:~:text=There%20are%202%20ways%20of,when%20the%20request%20is%20done. And watch this for Soap testing - czcams.com/video/DR3EEhjn2OI/video.html
Hi Raghav, Thanks a lot for all the videos , they are excellent and the approach is amazing. Have a query: How can we move to the next request in the collection with the next data available in the data file. Example: If password data is available in the data file with data1, data2, data3 etc and there are 3 requests in the collection Run request1 with data1 Run req2 with the data 2 Run request3 with data3 As i have huge number of requests i dont want to create different variables. Ive used postman.setNextRequest() to move to the next request else it is not running all the requests in the collection. But now it is running the next request with all data Can you please suggest and help. Thanks
Automation Step by Step - Raghav Pal Hi Raghav Have tried a lot of online help but couldn’t get a work around Would appreciate ur comments and help Thanks
Hi Raghav, I am following your course and has been too helpful for me. I have a POST API request which says all ok but no changes to the underlying database. Strange. would you suggest what the reason could be?
When I read in the JSON file per your example, it did not auto update the Iterations field so it left it at default of 1 and only runs one iteration. I had to manually update it to 2 and then it ran both iterations. It worked without incident for the .csv file. I did run the json through the beautifier so the syntax was correct.
How do I do that? I only watched a couple videos based on what my manager told me to watch and may have missed that. Can you provide here or link me to the video that explains it.
Hi Raghav, thanks for the series and I have a question here. In this video before selecting the data file in the collection runner screen the ITERATION was 1 and after selecting it is automatically changed to 2. When I tried it did not happen that way, and it is still shown as 1 and Postman does not execute the script with the second set of data. Should not it execute both the data even when iteration is 1?
I had learnt more with your videos thank you so much for all support. Could advise what is postman version used within this videos, i am not able to view the import of environment config and data config file. Is this license version of postman? please advise.
Hi Raghav, Thanks for sharing this videos with us, However I have come across one query regarding one scenario, would like for your suggestion on the same. So, my scenario is: I want to run multiple requests (eg 1000) for a single api with different user input fields, and in response, for every request I'll be getting the json form url which i need to validate. So how do i achieve this using postman? Please Advise.
Hi Priyanka, for data you can get from data file like csv. for validation as well you can create a post test script and refer the variable whose value will be coming from data file
Hi Raghav When I passed 2 sets of data in the CSV file, it is only taking the 1st set data for 2 times. And also while parsing the JSON file it is taking mail id which I am giving in the body, not in the JSON file. So how to overcome this issue please tell me?
Hi Raghav, I am following above session steps , facing some issue in 4th point, I wrote code as below: tests["having mail"]=responseBody.has(data.email); tests["having password"]=responseBody.has(data["password"]); Error: having mail | AssertionError: expected false to be truthy for all variable . Failed 4. Please guide where i did mistake.
Hi Ravi, have you checked if the variable names are correct and there is no type or spaces, Also try to debug czcams.com/video/ne1RsYcgkSY/video.html This may also help - stackoverflow.com/questions/54352177/postman-test-failure-false-to-be-truthy
I was just struggling with an issue that others seem to have where each iteration will show the same body, even after the preview works. Make sure to check your environment, I was in QA which previously instructed us to set variables that seem to overwrite the data file. changed to No Environment and it worked as expected
It looks like in Tests section, when we request (data.email) we are validating that word "email" is present in response, but when we are referring to (data["password"]) we expect the value of the "password" to be returned and validated against the value from Response body, right?
I am all set. Thanks. Just letting people know there are some editors that will auto-correct “plain straight quotes” to “smart curly quotes” and hard to notice unless you look closely.
Hi, I am trying to run a Collection from Postman which uses a CSV file to read data. The issue I'm facing is, the CSV file has 2 rows of data. But when the tests are run, the collection runs for 2 times, as expected, but with only the first row's data. It skips the data from the remaining 2nd row. Can you please help?
Hello Raghv l have a dought for me post()register successful link not working for you also but for header part working fine but for me that is also not working is there any thing to solve in previous videos also for me didn't work .in previous video also in my cmd node.js& npm -v also showing but trying to install newman not working ... showing ...in cmd no suchfile or directory is appearing..
Hi Raghav, I am facing issue with reading password detail from CSV file for 2nd row. In CSV file I have given details of password as newnorm it shows correctly in preview but after run in request body it gives me password details as pistol. Which is given for 1row. Could you help me with this? Also at the end of 2iteration under the response body, it gives the message as {"error":" Note: only defined users succeed registration"}
Free online courses - automationstepbystep.com/online-courses/
Hi Ragav
Can you please make a video on "Save api responses to local drive in excel"
I will try to do that soon Nagarjuna
@@RaghavPal thank you
This video series was AMAZING!
So organized, so professional, so easy to understand! The way you explain things is perfect. Other videos skip so many important details.
Covered all the major areas of PostMan, including how to automate it with newman/Jenkins.
Thank you so much!
Thanks for watching and sending me this message Yoshi.
Thanks Raghav for knowledge sharing! I had the same problem at first - each iteration showed the same body. So my little advice, for those who have this struggle - make sure that the name of the global variables (endpoint, email, password) are equal to those names you use in your JSON file and in a body of your request you run.
Thanks for the tips Inna
Your Video content is really good and I liked it.
I have generic Question- When we use Headers? and how we will know we have to use Header in anycase? kindly clarify me. Thanks in advance.
Hi Balkrishna, in general we provide headers on content-type and accep. This is to tell the server the type of content we are sending like XMl, JSON etc and the format that we want to accept XML, JSON etc. Apart from this any other authentication and headers if you need to add should be given to you from the owners of the api or the dev team
@@RaghavPal Thank you for responding :) I got it :)
I have started learning POSTMAN tool using this video only... The way u explain is very clear and understandable... Thanks a lot Raghav🙏🙏.
Keepup ur work.. it's very informative..
You are most welcome Gayathri
As usual very detail and informative. Being a postman user myself, even I learned a couple of things. Great tutorial, keep them coming :)
P.S. If you can improve the sound of the videos in upcoming series would be a great. thanks
Thanks for watching Akeel, will definitely work on sound
your time is 5 AM and you're making tutorials. not bad
I usually make them early mornings Steasy
@@RaghavPal God bless you Raghav, you are good man and a hard working man on mission!!
Thanks alot Raghav. I was able to fix an issue wrto the data driven testing with the help of this video.
You're welcome!
This is amazing video, could please explain if we have multiple request and every request i need to pass different data, how can we do this because right now for every request i need to upload different file, so i just want can we upload one file, Pls help on this
Hi Vibhor, you can use a single file and add your data and in your requests add the variables accordingly, You can also set the iterations from Collection Runner
@@RaghavPal thanks for this, when i add the variable for the second request in same json file then the data for that second request does not appear in the preview, as the variable are different. Also when i add two arrays for two request in json then it only execute for two iterations and does not pick data and gets fail
when you run from collection runner, increase the iteration count
@@RaghavPal Thanks for the reply, i think, i bit confuse to explain my problem, I have collection, that collection contains 7 different request, and I have to pass different data for every request, Few Steps - 1) open runner 2) select the collection (when i select the collection the all 7 request selected, Now if i want to run all 7 request so how can i do it because if i am uploading json/.csv file (this file contains only request 1 data) in the runner, other (2nd to 7th request) are fail. So my problem is how can prepare .csv / json for all 7 request in the single file or there is another way we can run continuous all request through one file (but all request have different data) Again thanks you for the reply
Check this Vibhor community.postman.com/t/csv-data-files-for-multiple-requests-within-one-collection/819
Thanks Raghav
Very useful for beginners 🙏🏻🙏🏻
Most welcome Sunita
great video . Thank you Raghav ! Please help me with few questions:
1 - Do we have a similar process of data-driven if we use SOAPUI , pls share video if you have SOAP UI link for same concept
2- What coding language did you use in tests and do you have a video of that coding language?
3- What level of expertise is needed on that coding language to support API testing for a QA.
4- One of my colleagues demoed a similar concept for REST through SOAP UI but that was too complex like importing library and then writing a long code to read excel data cell and then passing that value to the env variable but yours is far easier..what is it so? Does SOAP UI tool need a lot of additional dependencies to read data from xls /csv ? . Please share the video for SOAPUI Vs POSTMAN diff in this context ...
Sorry for so many questions but I'm eagerly waiting for a response! Thank you for all your great work !!
Hi Abhi,
1. You can check SoapUI tutorials here automationstepbystep.com/ and here automationstepbystep.com/udemy-discounts/
2. Its JavaScript, You can find beginner tutorials on the above link
3. Basic and OOP will be good
4. with SoapUI free ver you will need to do a lot of custom things
Best Video to get in about Data driven using postman ...Thanks
Glad it was helpful Kiran
Very good tutorial with clear instructions, nice touch on validating the json format, good on you, cheers!
Glad it was helpful Ben
Well explained Raghav-ji 😊
Thanks Jan
This is an excellent introduction to Postman, very well described, it is very clear and easy to follow. Good job!
Thanks for the message Dick de Goede
Hi Raghav, These are excellent videos and you are really helping people learn things easily and quickly.
Could you share some detail on how can we get inputs from DATABASE JDBC connection in postman?
Hi Chandan, you can see these examples
documenter.getpostman.com/view/5922408/RznJmGfn?version=latest
very helpful. very good series. thanks a lot Raghav Pal
Most welcome!
Great Video..I was exactly looking for this. Much thanks..
You are most welcome
Hi Raghav. Thanks for the video. Can you post video on how to get data from database to our request body in postman. It would be really helpful. Thank you.
Hi Avinash, will plan to add a session on this
the best video on the subject!
Thank you!!!!!
I am so humbled. Thanks for watching
Thank you, Raghav! This was very helpful. Keep up the great work!
Glad it was helpful Jay
The man does it again. Masterclass indeed thank you Mr Pal. I will give the same demo to my team.
Most welcome Mzamo
Very informative videos. Good work.
A simple query, at 15:05, responsebody.has(). This will look for "some value" in response body irrespective on the key under which that value is present, right?
Yes, correct Naveen
Thanks, greetings from Panama 🇵🇦
Thanks for watching Amílcar
love your class, short and useful!! thanks a lot!
You're very welcome Jean
Hi Raghav,
Your tutorial is really informative and very helpful too. I have couple of question regarding Data driven testing in Postman
1. Is there any way we can do a SQL/Oracle query and retrieve data using postman
2. Also is there any way we can compare DB extract with an API response
Thanks in advance.
HI Rakesh, In POSTMAN there is no out of the box feature to query db. Having API to interact with DB is one option. Read this
blog.getpostman.com/2018/02/09/read-and-write-to-rest-enabled-databases/
github.com/postmanlabs/postman-app-support/issues/2185
9:17
you have to save the csv file as [ csv (comma delimited) ] type, so the excel will add the comma automatically
thanks for adding
Hi Raghav,Thanks for the explanation is very useful. I have a question that can we use Envrionment Varible in Pre-request script of another request?
Hi Pooja, yes, we can, you can also use global variables
1. Scope- Environment variables can be accessed with the corresponding environments. Global variables can be accessed broadly regardless of the selected environment.
2. Priority : priority is as follows:
- local
- data
- environment
- collection
- global
So in case a global variables shares same name with an environment variables, at runtime value will be referenced from env variable
3. Getting & Setting variables through scripts
- Global - pm.globals.set()
- pm.globals.get()
- Env - pm.environment.set()
- pm.environment.get()
learning.getpostman.com/docs/postman/environments_and_globals/intro_to_environments_and_globals/
pm.variables is for local variables for e.g.
pm.variables.set("variable_key", "variable_value");
Local variables are temporary values you set in your request scripts.
Also
//access a variable at any scope including local
pm.variables.get("variable_key");
//access a global variable
pm.globals.get("variable_key");
//access a collection variable
pm.collectionVariables.get("variable_key");
//access an environment variable
pm.environment.get("variable_key");
Excellent.
Very informative video.
Thanks for watching Ritesh
Really nice videos. I like the way you covered all the minors tricks. This video helped me a lot.
Thanks Raghav.
You're welcome Ritesh
Thanks for the detailed explanation. Can we write a pre request script to upload an image as binary in the Body of the request?
I have an api in which I upload the image binary in the body before sending the request. I'm trying to validate this through script. Could you please guide me how to write the script for this. Thank You.
Hi Siddhartha, this can help you
community.postman.com/t/how-to-upload-images-to-a-post-request/15256
Hey Raghav, could you plz let me know how can we use data files if we want to run entire collection which has multiple requests and needs multiple files. Thanks in advance...& BTW video was super informative and helped me a lot. Thanks for that buddy!!
Hi Saumil, 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
This is perfect. How to get data from csv file using CLI (Newman) ?
Hi Khaled,
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
Thank you Raghav :)
Hi Raghav,
Just want to say thank, you made it very easy.
You're welcome Sherry
ty sir ur explanation so good very helpful to undrstnd.
You are most welcome Fachrizal
Hi Raghav, i went through all of ur videos..
I have some questions..
1. Do we have an option to write back the response we get to the csv file..?
If so how can it be done..
2. Can we create multiple requests from the data we have stored in the csv file?
Please let me know how can it be done as soon as possible.
Thanks in advance 😊
Hi Megha,
1. You can do, will need to add scripts
2. Yes we can, again it will depend how you have setup your request on postman.
You can refer variable values from csv file, so whereever you need you can add variables and then put the value in csv. Any complex operation may require scripting
@@RaghavPal Thank u so much raghav this helped details helped me a lot..
Do you have any video that helps us to write back the response. If so can u please share it😊
not yet Megha. Can find all here - automationstepbystep.com/
Useful! Thank you!
Most welcome Erlyn
I kept having "Response body was not logged" message after running the collection - turns out now you have to put checkmark against "Save responses" field before clicking Run the collection.
Yes Alessia, there may be some changes.
Thank you so much. Your all video tutorials are best for learning. Once again I want to say you are the best. I have one question, what is the benefit of creating the variable in Global?
Thanks for the kind words Mahfuzul. The global variables can be used across collections. Basically the diff is in scope and priority and you can use as per your needs.
The diff is as follows:
1. Scope- Environment variables can be accessed with the corresponding environments. Global variables can be accessed broadly regardless of the selected environment.
2. Priority : priority is as follows:
- local
- data
- environment
- collection
- global
So in case a global variables shares same name with an environment variables, at runtime value will be referenced from env variable
Thank you so much
Great tutorial. Thanks
Most welcome
Hi Raghav,
Thank you for making this series. These videos have been really helpful.
For one of my project I am using an external data set(CSV File) for iterations.
Is it possible to run a collection which is using a CSV or JSON file as an external data set through Newman?
If yes, can you please explain that.
Thank You
Hi Shubham,
Yes you can. 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
This is a best video what I have seen on this topic
Happy and humbled to see this Zulfi
Hi Raghav, First of all, thanks for such an informative tutorial on API Testing using Postman, One more favour needed, could you pls upload some advanced level tutorial on API testing using POSTMAN also API Interview QnA.
Thanks in Advance
Happy Quality Testing.
Hi Pardeep, I will do that surely
Hello Raghav, Thanks for all the excellent videos on POSTMAN. Could you please create a video for exporting responses body of all the request executed through data driven tests in collection runner. As of now, response from the collection runner is available to for viewing in Collection runner window. Thanks again. Jawad
Hi Jawad, I will check on this, May be some scripts will be required.
@@RaghavPal Hi Raghav, even i am waiting for the scripts which reads the response body and export it to the csv file..
Dear Raghav,
Hope you are well, i have a question, if i can read from the collection runner preview (specifically the response) and past it to the equivalent values of the row in the CSV file as the actual result.
Hope you can have some way to help me.
Hi Ahmed, You will have to do scripting for that. Pls try some online help
Hi Raghav, I like all of your videos, I regularly watch your video. You are doing great job. I have a question, as I am very new to POSTMAN, you have used few Syntax like "Responsebody.has" in Tests bar. What does this Syntax "Responsebody.has" means ? and where I will get the list of all Syntax with descriptions.
Hi Sudeep, thanks for the message, you can check the test snippets in the test section
Got yourself a Sub Sir, very informative video! Keep it up!
Awesome, thank you!
I truly enjoyed this video. I do have one question. How would i do a loop so all the result from the get get added in de put ?
Hi, thanks for watching, you can put in test script
There was an error running your collection: getaddrinfo ENOTFOUND reqres.inapi
how can I solve this issue ?
Hi Abbas, pls check if the api works without data driven, there can be some issue with reqres site, You can try other apis from here medium.com/swlh/fake-rest-apis-that-we-can-use-to-build-prototypes-2a7946704726
Hi ,Thank you for the detailed Video really saved my day.
What if the I run a job in collection Run and I have 20 Iterations , I want to save the response body of all 20 Iterations to my local machine returned by the API.
Is it possible?
Hi Ankita, thanks for watching. Check this link
github.com/postmanlabs/postman-app-support/issues/3033#issuecomment-301758179
Excellent video! Thanks
You're welcome Sam
Thank you so much for this!
You're so welcome Marcio
Awesome Series !!!! THANKYOU
You're welcome Devaraj
super brother.. thank you.
So nice of you
just want to said thanks ^^
Most welcome Thanh
A question from me: How come in your test script, you write for the email part (data.email) and for the password it's (data["password"]) ? I would it to be (data.password), matching the syntax of the email validation line.
Otherwise thanks so much for these guides, very clear, concise, and helpful :) People like you make the world go 'round!
Hi these are two ways of accessing the variable, so I showed both
@@RaghavPal Ahh okay, I didn't pick that up :) Thank you!
Thanks Raghav, this Knowledge sharing was helpful to me.
Glad to know this Ram
Awesome explaination 👌
Thank you Sajina
Hello Raghav, Thanks for the awesome video :)
Can we add test data for more than one request in a single data file?
Right now I can only add the data for one request in a one data file.
Thanks
You can Sayali, you will have to use the variables accordingly. This will help community.getpostman.com/t/csv-data-files-for-multiple-requests-within-one-collection/819/2
Thanks for your quick response. Is there any link to describe the exact steps for this ? From the above link,it is not that clear how to do the same.
Currently I am facing below issue.
I have prepared the data for multiple requests in a single data file, provided the parameter/variable names are different in all the requests.
Request 1 has parameter names as A,B,C and request 2 has P,Q and R.
Prepared 3 different data sets for request one and three for request 2. After passing the data file, in the preview option I can see 6 datasets for request one and not for 2.
Hi Sayali, I could not find any link with exact steps for you. May be I can try to create a session, but can take time.
Thank you very much for the tutorial! Helped a lot :-)
You're welcome
I have added the tests tab with the script but I am returned with fail status which says AssertionError: expected false to be truthy can I please know solution for this
Hi Soujanya, have you checked if the variable names are correct and there is no type or spaces, Also try to debug czcams.com/video/ne1RsYcgkSY/video.html
This may also help - stackoverflow.com/questions/54352177/postman-test-failure-false-to-be-truthy
Thanks a lot brother
most welcome
THank you man. Really good.
Glad you liked it Eliecer
Instead of creating environment variables for each field in request body is there any way to pass the json from external and also can you make video on the same topic on Newman
Hi Vijay, you can refer the data from json and csv files and there is tutorial on that, Not sure if you can get the complete body and structure directly. Will need to check online
Good video.Thanks
You're welcome Shreyas
you are doing a great job raghav. Can you post more videos?
I will do that soon, Thanks for watching.
thank you this tutorial helps a lot.
You're welcome
Thank you Raghav, learnt so much from you. I have 1 question that How we can run same via Jenkins?
Hi Mamta, there is a video on that, Check the postman playlist here - automationstepbystep.com/
Hi Raghav, firstly very well done on the beginner tutorial - one question though: In testscripts section, should a global variable always be used? Can you use a local variable in there ? Thank you in advance for your response ^_^
Hi Kovila, you can use a script variable if he scope is only in that script. Global var should be used when you want to access them across project and env variables should be used when you want to use diff values for diff env.
Sir make a video covering authentication with APIs.
Sure Sumit will do
@@RaghavPal Thanks
Hello Raghav, I am able to achieve this without creating the Variables just in the request body pass your keys Eg."{{name}}" and run the collection with JSON and it will create the record.
Hi Ankit, yes if you have set variables within the project you can use with the syntax {{}}. There is a video on variables
Raghav, one question here. When you assign variables in a global env, and then refer the endpoint from that variable... like you did for the api/register/preprod with Endpoint. Should I be in the "No Environment" and execute ? or should I be in QA env and execute. Coz in each env, it gives different results.. pl explain
Hi Lowrence, I will suggest to be very honest in interviews, If you do not have the skills required for the job, you can try to get some basic knowledge before the interview and in the interview you can mention, that,
"I did not get a chance to work on this in my job until now, but I have tried to get knowledge and exp on this on my own and I am eagerly looking forward to work on this technology. If given an opportunity, I am ready to learn and perform. I can also take out my personal time to learn the required skills before I join the job here."
Experienced and genuine interviewers always appreciate honesty and are always ready to hire somebody who has the will to learn and perform on any duty.
@@RaghavPal My question was about Postman
Raghav, one question here. When you assign variables in a global env, and then refer the endpoint from that variable... like you did for the api/register/preprod with Endpoint. Should I be in the "No Environment" and execute ? or should I be in QA env and execute. Coz in each env, it gives different results.. pl explain
Hi Lawrence, looks like I mixed up responses. Sorry for that. When you create env variables, you give name to your env. Now when you run your request you will need to select the env from the dropdown (top right) and only then the values will get referred from that env.
Kudos to you for the video content! Nice job. Please stop zooming in and out though. Its kinda irritating.
Sure Chitresh, I will take care of this.
Hi, Raghav.
thank you for these very useful videos. i am always enjoying learning from your channel.
i have an question how to upload multiple objects from csv to postman. can you please help figure it out.
thank you
Hi Enver, I will check and plan a session. For now, pls try online help. Let me know if you find something. Can help others
Thanks for video Raghav. Question - for testing REST API - which is preferred tool; SoapUI or Postman ? Thanks for your response !
Hi Naveen, both of these tools are good. Few things you can consider.
1. Both SoapUI and Postman have free and commercial versions
2. In Postman the free version has mostly all features and major difference is in terms of monthly calls,
check here - www.getpostman.com/pricing
3. In SoapUI there are several features that are available as click and do in commercial versions, however in open source version you will have to add groovy scripts for the same.
4. Both these tools can handle REST well
5. In case of SOAP, SoapUI is better suited as of now.
You can also watch my SoapUI tutorial which is on open source version here -
czcams.com/play/PLhW3qG5bs-L-Bt9T_bnyflQ0Te4VgFhKF.html
New videos will be added soon
Hi Raghav, the only way for using the data file is when you run the request with the collection runner? Thanks
Hi Ana, Yes, or you can do custom scripting
Hello Raghav Pal,
Thanks for these videos, i'm new to API testing and learned a lot from your videos. I do have a question, When we are passing invalid value through JSON or CSV then how do we write a validation for it? (I know we can write it in Test section) do you have any specific video which tells us how to do the validation or point me to your blog or any other blog which can help me?
Hi Nihal, so as you mentioned you can write a test for it, So test scripts will run after the test on response. Do you want to do something diff than this
Hello Raghav. I'm trying to write a scenario, i have a field which accepts only 10 character.
var jsonData = JSON.parse(request.data);
if (pm.expect(jsonData.criteria.carmodelInformation.carmodelName.length).to.be.below(11))
{
pm.test("Valid Car Model Name is Passed", function ()
{
pm.response.to.have.status(200);
}
);
}
else
{
pm.test("Verification of Error Message in the response Body", function()
{
pm.response.to.have.status(400);
}
);
}
My scenario is, if i enter more than 10 characters for the field then it fails. i get "There was an error in evaluating the test script: AssertionError: expected 15 to be below 11" error. error message.
But when i enter less than 10 characters then scenario is passed. Is there a problem with script or can you please point me to where am i doing mistake.
Thanks for the help.
Hi Raghav.... great learning from u..I hv one doubt in this vid...why use preprod at last in api???
Hi Monali, it was to refer the variable endpoint. You can replace with your url
@@RaghavPal but we are added preprod in the end of api like api/registers/preprod after that we replace it with endpoint...dats y m confused y added just after register.
This was just to demo how we may have to update part of the endpoint for diff env in real world
Hi raghav, can you start making some tutorials on telerik? It will be helpful.
I will plan Sumit
Really helpful thanks
You're welcome
HI, thank you for your awesome videos. They have helped me a lot for my new job.
I was wondering if it was possible to do this with a variable in the header?
You're welcome Gene. Yes variables should work in headers too. Try out.
Thanks for all the awesome videos.
Is there any way to export JSON data into a CSV file from the postman or from Jenkins and trigger that job?
Hi Chelsi, I will need to check on that
Hi Raghav - Please let me know how to do data driven for SOAP Request. Believe above is only for REST Call. I am looking to read input till End of file: for reach input call SOAP request and print response in a file. Please kindly share URL
Hi Madhan, I have a video in this playlist for Soap request. Pls check that and you can apply similar concepts of data driven testing there
@@RaghavPal Thanks for your reply. Gone through the video and not finding data driven for SOAP calls. Hearing that in post man , we cant do data driven for SOAP calls. Not sure if that is a correct statement. Please advise.
For sending response to a file, you can check this - stackoverflow.com/questions/46812596/saving-api-response-in-postman-to-a-file#:~:text=There%20are%202%20ways%20of,when%20the%20request%20is%20done.
And watch this for Soap testing - czcams.com/video/DR3EEhjn2OI/video.html
Hi Raghav,
Thanks a lot for all the videos , they are excellent and the approach is amazing.
Have a query: How can we move to the next request in the collection with the next data available in the data file.
Example:
If password data is available in the data file with data1, data2, data3 etc and there are 3 requests in the collection
Run request1 with data1
Run req2 with the data 2
Run request3 with data3
As i have huge number of requests i dont want to create different variables.
Ive used postman.setNextRequest() to move to the next request else it is not running all the requests in the collection. But now it is running the next request with all data
Can you please suggest and help. Thanks
HI, I will have to test and check this scenario. Meanwhile also try online help
Automation Step by Step - Raghav Pal
Hi Raghav
Have tried a lot of online help but couldn’t get a work around
Would appreciate ur comments and help
Thanks
Okay, I will need to check on this when I get some time
Hi Raghav, I am following your course and has been too helpful for me. I have a POST API request which says all ok but no changes to the underlying database. Strange. would you suggest what the reason could be?
Hi, do you get successful response code and message, It may be issue from the backend.
When I read in the JSON file per your example, it did not auto update the Iterations field so it left it at default of 1 and only runs one iteration. I had to manually update it to 2 and then it ran both iterations. It worked without incident for the .csv file. I did run the json through the beautifier so the syntax was correct.
Hi, try running this from commandline.
How do I do that? I only watched a couple videos based on what my manager told me to watch and may have missed that. Can you provide here or link me to the video that explains it.
You can select Postman from here and see the complete playlist - automationstepbystep.com/909-2/online-courses/
Hi Raghav, thanks for the series and I have a question here.
In this video before selecting the data file in the collection runner screen the ITERATION was 1 and after selecting it is automatically changed to 2. When I tried it did not happen that way, and it is still shown as 1 and Postman does not execute the script with the second set of data. Should not it execute both the data even when iteration is 1?
Hi Vinay, Try to not give any iteration count and check
I had learnt more with your videos thank you so much for all support. Could advise what is postman version used within this videos, i am not able to view the import of environment config and data config file. Is this license version of postman? please advise.
Hi Pavan, you may see some changes in the new ver, I will plan to add new videos
@@RaghavPal Thank you :) could provide the version used for demo, please.
I do not specifically remember the ver, I may have shown in some video
Hi Raghav,
Thanks for sharing this videos with us,
However I have come across one query regarding one scenario, would like for your suggestion on the same.
So, my scenario is:
I want to run multiple requests (eg 1000) for a single api with different user input fields,
and in response, for every request I'll be getting the json form url which i need to validate.
So how do i achieve this using postman?
Please Advise.
Hi Priyanka, for data you can get from data file like csv. for validation as well you can create a post test script and refer the variable whose value will be coming from data file
quick question Raghav!!
where did preprod come from?
I forgot but I saw it in an earlier video. Is it a type of environment or variable?
Yes it is example of env PreProduction
Hi Raghav
When I passed 2 sets of data in the CSV file, it is only taking the 1st set data for 2 times. And also while parsing the JSON file it is taking mail id which I am giving in the body, not in the JSON file. So how to overcome this issue please tell me?
Hi Ashirbad, I hope you have saved the csv after adding the 2nd set. Also save and run the collection again. You can manually set the iteration to 2.
Hi Raghav, I am following above session steps , facing some issue in 4th point, I wrote code as below:
tests["having mail"]=responseBody.has(data.email);
tests["having password"]=responseBody.has(data["password"]);
Error:
having mail | AssertionError: expected false to be truthy
for all variable . Failed 4.
Please guide where i did mistake.
Hi Ravi, have you checked if the variable names are correct and there is no type or spaces, Also try to debug czcams.com/video/ne1RsYcgkSY/video.html
This may also help - stackoverflow.com/questions/54352177/postman-test-failure-false-to-be-truthy
I was just struggling with an issue that others seem to have where each iteration will show the same body, even after the preview works. Make sure to check your environment, I was in QA which previously instructed us to set variables that seem to overwrite the data file. changed to No Environment and it worked as expected
Thanks for sharing this Andrew
I am struggling with this error. environment not works out for me. Can u help?
It looks like in Tests section, when we request (data.email) we are validating that word "email" is present in response, but when we are referring to (data["password"]) we expect the value of the "password" to be returned and validated against the value from Response body, right?
Hi Elena, no actually we are trying to check the presence of the parameter, These are 2 ways of doing that
Hello Raghav i am facing issue in the second request it shows the "this request does not have any tests."
Hi Ankit, so have you added tests in the test section and also make sure to save.
Thanks. I had trouble with smart quotes while creating json file in my tiny screen mac.
Please let me know if you are still facing issues.
I am all set. Thanks. Just letting people know there are some editors that will auto-correct “plain straight quotes” to “smart curly quotes” and hard to notice unless you look closely.
Hi,
I am trying to run a Collection from Postman which uses a CSV file to read data. The issue I'm facing is, the CSV file has 2 rows of data. But when the tests are run, the collection runs for 2 times, as expected, but with only the first row's data. It skips the data from the remaining 2nd row.
Can you please help?
Hi Dhrumil, pls check the iteration count you have given
professional , Good Luck
Thanks for watching Umair
You are welcome @@RaghavPal
Hello Raghv l have a dought for me post()register successful link not working for you also but for header part working fine but for me that is also not working is there any thing to solve in previous videos also for me didn't work .in previous video also in my cmd node.js& npm -v also showing but trying to install newman not working ... showing ...in cmd no suchfile or directory is appearing..
Hi Imtiaz, do you have logs, can try to do the setup again
Hi Raghav,
I am facing issue with reading password detail from CSV file for 2nd row. In CSV file I have given details of password as newnorm it shows correctly in preview but after run in request body it gives me password details as pistol. Which is given for 1row. Could you help me with this?
Also at the end of 2iteration under the response body, it gives the message as
{"error":" Note: only defined users succeed registration"}
Hi Shashank, pls try setting the iteration count in collection runner