POSTMAN BEGINNER TUTORIAL 15 💡 Data Driven Testing | How to get data from CSV, JSON file

แชร์
ฝัง
  • เผยแพร่เมื่อ 19 ธ.ค. 2024

ความคิดเห็น • 528

  • @RaghavPal
    @RaghavPal  5 ปีที่แล้ว +3

    Free online courses - automationstepbystep.com/online-courses/

    • @nagarjunapunyala7391
      @nagarjunapunyala7391 5 ปีที่แล้ว

      Hi Ragav
      Can you please make a video on "Save api responses to local drive in excel"

    • @RaghavPal
      @RaghavPal  5 ปีที่แล้ว +1

      I will try to do that soon Nagarjuna

    • @nagarjunapunyala7391
      @nagarjunapunyala7391 5 ปีที่แล้ว

      @@RaghavPal thank you

  • @YoshiKirishima
    @YoshiKirishima 6 ปีที่แล้ว +9

    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!

    • @RaghavPal
      @RaghavPal  6 ปีที่แล้ว

      Thanks for watching and sending me this message Yoshi.

  • @innadolina3870
    @innadolina3870 4 ปีที่แล้ว +2

    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.

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      Thanks for the tips Inna

  • @gayathris4422
    @gayathris4422 3 ปีที่แล้ว

    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..

    • @RaghavPal
      @RaghavPal  3 ปีที่แล้ว

      You are most welcome Gayathri

  • @NaveenKumar-dl2ez
    @NaveenKumar-dl2ez 4 ปีที่แล้ว +1

    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?

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      Yes, correct Naveen

  • @PerpetuoBeats
    @PerpetuoBeats 4 ปีที่แล้ว

    the best video on the subject!
    Thank you!!!!!

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      I am so humbled. Thanks for watching

  • @siddharthau489
    @siddharthau489 2 ปีที่แล้ว +1

    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.

    • @RaghavPal
      @RaghavPal  2 ปีที่แล้ว

      Hi Siddhartha, this can help you
      community.postman.com/t/how-to-upload-images-to-a-post-request/15256

  • @sultan-algarbi
    @sultan-algarbi 3 ปีที่แล้ว

    9:17
    you have to save the csv file as [ csv (comma delimited) ] type, so the excel will add the comma automatically

    • @RaghavPal
      @RaghavPal  3 ปีที่แล้ว +1

      thanks for adding

  • @steasy5673
    @steasy5673 5 ปีที่แล้ว +2

    your time is 5 AM and you're making tutorials. not bad

    • @RaghavPal
      @RaghavPal  5 ปีที่แล้ว +2

      I usually make them early mornings Steasy

    • @The-dw1ms
      @The-dw1ms 5 ปีที่แล้ว

      @@RaghavPal God bless you Raghav, you are good man and a hard working man on mission!!

  • @ytwoen4137
    @ytwoen4137 3 ปีที่แล้ว

    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 ?

    • @RaghavPal
      @RaghavPal  3 ปีที่แล้ว

      Hi, thanks for watching, you can put in test script

  • @kiranjape3941
    @kiranjape3941 4 ปีที่แล้ว

    Best Video to get in about Data driven using postman ...Thanks

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      Glad it was helpful Kiran

  • @abhigupta9727
    @abhigupta9727 4 ปีที่แล้ว

    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 !!

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      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

  • @poojapatil188
    @poojapatil188 3 ปีที่แล้ว +1

    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?

    • @RaghavPal
      @RaghavPal  3 ปีที่แล้ว

      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");

  • @mukhaddarshaik7796
    @mukhaddarshaik7796 2 ปีที่แล้ว

    Thanks alot Raghav. I was able to fix an issue wrto the data driven testing with the help of this video.

    • @RaghavPal
      @RaghavPal  2 ปีที่แล้ว

      You're welcome!

  • @ahmedabulela5730
    @ahmedabulela5730 5 ปีที่แล้ว +1

    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.

    • @RaghavPal
      @RaghavPal  5 ปีที่แล้ว

      Hi Ahmed, You will have to do scripting for that. Pls try some online help

  • @balkrishnasethi1964
    @balkrishnasethi1964 3 ปีที่แล้ว +2

    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.

    • @RaghavPal
      @RaghavPal  3 ปีที่แล้ว +1

      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

    • @balkrishnasethi1964
      @balkrishnasethi1964 3 ปีที่แล้ว

      @@RaghavPal Thank you for responding :) I got it :)

  • @radio655
    @radio655 4 ปีที่แล้ว

    Well explained Raghav-ji 😊

  • @lowrencekalyansingh5922
    @lowrencekalyansingh5922 4 ปีที่แล้ว

    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

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว +1

      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.

    • @lowrencek3592
      @lowrencek3592 4 ปีที่แล้ว

      @@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

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      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.

  • @batman78845
    @batman78845 4 ปีที่แล้ว +1

    at 14:57, why we are passing email directly as data.email and for password data["password"], Why this difference ?

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว +1

      Hi Arun, these are the 2 ways. You can follow either

    • @batman78845
      @batman78845 4 ปีที่แล้ว

      @@RaghavPal ok, ok Thank you, Nice video.... one more doubt, For same way If I want to take the token value and pass it as variable how to do ? (I mean each execution time token values will change right?)

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว +1

      There is a video on chaining in the postman playlist. Pls check - automationstepbystep.com/

  • @abpatel5943
    @abpatel5943 3 ปีที่แล้ว

    very helpful. very good series. thanks a lot Raghav Pal

    • @RaghavPal
      @RaghavPal  3 ปีที่แล้ว

      Most welcome!

  • @vibhorsharma2436
    @vibhorsharma2436 4 ปีที่แล้ว +3

    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

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว +1

      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

    • @vibhorsharma2436
      @vibhorsharma2436 4 ปีที่แล้ว

      @@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
      @RaghavPal  4 ปีที่แล้ว +1

      when you run from collection runner, increase the iteration count

    • @vibhorsharma2436
      @vibhorsharma2436 4 ปีที่แล้ว

      @@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

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      Check this Vibhor community.postman.com/t/csv-data-files-for-multiple-requests-within-one-collection/819

  • @shubhamshrivastava5311
    @shubhamshrivastava5311 5 ปีที่แล้ว +1

    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

    • @RaghavPal
      @RaghavPal  5 ปีที่แล้ว

      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

  • @nina10103
    @nina10103 5 ปีที่แล้ว

    Hi Raghav, the only way for using the data file is when you run the request with the collection runner? Thanks

    • @RaghavPal
      @RaghavPal  5 ปีที่แล้ว

      Hi Ana, Yes, or you can do custom scripting

  • @tejapradeep
    @tejapradeep 6 ปีที่แล้ว

    @ 3:00 in this video when you added Preprod in the URL how did the ID and creat date details are added in the response ? can you please explain this in detail I didn't get it

    • @RaghavPal
      @RaghavPal  6 ปีที่แล้ว

      this is something i just observed while doing some changes,

  • @sunitasharma5037
    @sunitasharma5037 3 ปีที่แล้ว

    Thanks Raghav
    Very useful for beginners 🙏🏻🙏🏻

    • @RaghavPal
      @RaghavPal  3 ปีที่แล้ว

      Most welcome Sunita

  • @jeremyrubio1531
    @jeremyrubio1531 3 ปีที่แล้ว

    Hi, Thank you for sharing your knowledge. I just have some questions though, can I read the output in the postman terminal and can I also create validation in Data Driven Testing ? Thank you.

    • @RaghavPal
      @RaghavPal  3 ปีที่แล้ว +1

      yes you can Jeremy, I will plan to add sessions

    • @jeremyrubio1531
      @jeremyrubio1531 3 ปีที่แล้ว

      @@RaghavPal Thank you. Done subscribing hahaha

  • @benwang3663
    @benwang3663 3 ปีที่แล้ว

    Very good tutorial with clear instructions, nice touch on validating the json format, good on you, cheers!

    • @RaghavPal
      @RaghavPal  3 ปีที่แล้ว

      Glad it was helpful Ben

  • @AkeelAmeen
    @AkeelAmeen 6 ปีที่แล้ว +4

    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

    • @RaghavPal
      @RaghavPal  6 ปีที่แล้ว

      Thanks for watching Akeel, will definitely work on sound

  • @djdegoed
    @djdegoed 5 ปีที่แล้ว

    This is an excellent introduction to Postman, very well described, it is very clear and easy to follow. Good job!

    • @RaghavPal
      @RaghavPal  5 ปีที่แล้ว

      Thanks for the message Dick de Goede

  • @ankitanautiyal370
    @ankitanautiyal370 6 ปีที่แล้ว +2

    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?

    • @RaghavPal
      @RaghavPal  6 ปีที่แล้ว

      Hi Ankita, thanks for watching. Check this link
      github.com/postmanlabs/postman-app-support/issues/3033#issuecomment-301758179

  • @chelsijain5249
    @chelsijain5249 3 ปีที่แล้ว

    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?

    • @RaghavPal
      @RaghavPal  3 ปีที่แล้ว +1

      Hi Chelsi, I will need to check on that

  • @dougm7499
    @dougm7499 6 ปีที่แล้ว

    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.

    • @RaghavPal
      @RaghavPal  6 ปีที่แล้ว

      Hi, try running this from commandline.

    • @dougm118
      @dougm118 6 ปีที่แล้ว

      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.

    • @RaghavPal
      @RaghavPal  6 ปีที่แล้ว

      You can select Postman from here and see the complete playlist - automationstepbystep.com/909-2/online-courses/

  • @hutchkishore
    @hutchkishore 3 ปีที่แล้ว

    Hello Raghav, Thanks for a nice video. Is it possible set the path of data file using code rather than selecting it manually everytime. Whenver I run a collection runner, I have to select the file manually even though there is no change in test data. Could you pls advise how to acheive this? Thanks

    • @RaghavPal
      @RaghavPal  3 ปีที่แล้ว

      Hi Kishore, yes, you can do it in the script and better you can do it from command line
      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

    • @hutchkishore
      @hutchkishore 3 ปีที่แล้ว

      @@RaghavPal Sure Raghav. Will give it a try. Thanks a lot for your reply. Is it possible to specify the path in Postman instead of Newman as I am facing trouble setting up Newman.

    • @RaghavPal
      @RaghavPal  3 ปีที่แล้ว

      for command line you will need to use Newman, else you can run from Postman UI

  • @mzamomahaeng268
    @mzamomahaeng268 4 ปีที่แล้ว

    The man does it again. Masterclass indeed thank you Mr Pal. I will give the same demo to my team.

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      Most welcome Mzamo

  • @khaledlimem4531
    @khaledlimem4531 4 ปีที่แล้ว +1

    This is perfect. How to get data from csv file using CLI (Newman) ?

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว +1

      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

    • @khaledlimem4531
      @khaledlimem4531 4 ปีที่แล้ว

      Thank you Raghav :)

  • @Hikari_Quin_Ch.
    @Hikari_Quin_Ch. 3 ปีที่แล้ว

    Mr.Raghav I actually have the Postman V.8.6.1 and I keep having an issue on the 14:01 when I run the test.
    I follow your tutorial step by step I guess Im having this issue because of the postman version I have. Please help me

    • @RaghavPal
      @RaghavPal  3 ปีที่แล้ว

      Hi, in case its due to ver change, you can check the latest documentation on postman site, I will also check

    • @Hikari_Quin_Ch.
      @Hikari_Quin_Ch. 3 ปีที่แล้ว

      @@RaghavPal do you also plan to make a video of a Postman for Intermidiate and Expert??

  • @amilcarrodriguez8449
    @amilcarrodriguez8449 4 ปีที่แล้ว

    Thanks, greetings from Panama 🇵🇦

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว +1

      Thanks for watching Amílcar

  • @sahilpandita4658
    @sahilpandita4658 2 ปีที่แล้ว

    Great Video..I was exactly looking for this. Much thanks..

    • @RaghavPal
      @RaghavPal  2 ปีที่แล้ว

      You are most welcome

  • @kasunherath2173
    @kasunherath2173 4 ปีที่แล้ว +1

    why have you given preprod after the endpoint in the post req?

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      It was just for example and demo. In real world usually the last part of the url changes with env

    • @kasunherath2173
      @kasunherath2173 4 ปีที่แล้ว

      I didnt declare any environment in my case but still gives error but when /preprod is given it works fine but I havent declared anything as preprod 🤔

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      Hi Kasun, these are not real APIs so do not worry. as long as you get the concept

  • @shrutisaxena6797
    @shrutisaxena6797 6 ปีที่แล้ว

    thanks Raghav for the video, I have a question here ...If I want to send a GET request, endpoints from csv/json and want to verify particular response value from each iteration response. what i need to add in test?

    • @RaghavPal
      @RaghavPal  6 ปีที่แล้ว +1

      Hi Shruti, you have to parametrize your requests and assertions with variables, and then use the values form csv or json file as shown

    • @shrutisaxena6797
      @shrutisaxena6797 6 ปีที่แล้ว

      thanks Raghav, I was trying the same example with both .jason and .csv however when from .csv i am taking data ,the second iteration is getting failed. I have verified the format it is fine. Not able to get the issue. This is working fine with .jason file.

    • @shrutisaxena6797
      @shrutisaxena6797 6 ปีที่แล้ว

      solved this the last row had space and in preview it appeared as /r, removed space in notepad++

    • @Lokesh.Mittal
      @Lokesh.Mittal 4 ปีที่แล้ว

      ​@@shrutisaxena6797 Hi Shruti, I have a query that if I wanna check a particular value in response for every iteration that what should I do. e.g my endpoint is sandbox-test.com/id/12345
      and response have an "id": "12345",

  • @haimaddyful
    @haimaddyful 4 ปีที่แล้ว +1

    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
      @RaghavPal  4 ปีที่แล้ว

      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

    • @haimaddyful
      @haimaddyful 4 ปีที่แล้ว

      @@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.

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      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 - th-cam.com/video/DR3EEhjn2OI/w-d-xo.html

  • @ankitshrivastava1772
    @ankitshrivastava1772 4 ปีที่แล้ว

    Hello Rahav, in the case if we have to send payload in Array then how to send in the data-driven scenario. In my case, I have to send 5 keys and value pair in which one key is Array.

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      Hi Ankit, In postman, set method type to POST.
      Then select Body -> form-data -> Enter your parameter name (file according to your code) and on right side next to value column, there will be dropdown "text, file", select File. choose your image file and post it.
      stackoverflow.com/questions/39037049/how-to-upload-a-file-and-json-data-in-postman

    • @ankitshrivastava1772
      @ankitshrivastava1772 4 ปีที่แล้ว

      @@RaghavPal Thanks Raghav i try and let you know .

  • @riteshkumar6403
    @riteshkumar6403 5 ปีที่แล้ว +1

    Excellent.
    Very informative video.

    • @RaghavPal
      @RaghavPal  5 ปีที่แล้ว

      Thanks for watching Ritesh

  • @cdr8556
    @cdr8556 5 ปีที่แล้ว

    Thanks. I had trouble with smart quotes while creating json file in my tiny screen mac.

    • @RaghavPal
      @RaghavPal  5 ปีที่แล้ว +1

      Please let me know if you are still facing issues.

    • @cdr8556
      @cdr8556 5 ปีที่แล้ว +2

      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.

  • @raash133
    @raash133 6 ปีที่แล้ว

    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.

    • @RaghavPal
      @RaghavPal  6 ปีที่แล้ว

      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

  • @pavankumarpabbisetty8743
    @pavankumarpabbisetty8743 2 ปีที่แล้ว

    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.

    • @RaghavPal
      @RaghavPal  2 ปีที่แล้ว +1

      Hi Pavan, you may see some changes in the new ver, I will plan to add new videos

    • @pavankumarpabbisetty8743
      @pavankumarpabbisetty8743 2 ปีที่แล้ว

      @@RaghavPal Thank you :) could provide the version used for demo, please.

    • @RaghavPal
      @RaghavPal  2 ปีที่แล้ว

      I do not specifically remember the ver, I may have shown in some video

  • @raisaaltaf
    @raisaaltaf 4 ปีที่แล้ว

    Hi Raghav, do you have interview questions for API automation please let me know thanks .

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว +1

      Hi, not yet, I have API testing section here - automationstepbystep.com/ Will add interview section soon

    • @raisaaltaf
      @raisaaltaf 4 ปีที่แล้ว

      Automation Step by Step - Raghav Pal Thank you your videos are helping me a lot to understand bless you for all the efforts you are doing .

  • @jaybongcaron4758
    @jaybongcaron4758 4 ปีที่แล้ว

    Thank you, Raghav! This was very helpful. Keep up the great work!

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      Glad it was helpful Jay

  • @ChaliyeyYaar
    @ChaliyeyYaar 4 ปีที่แล้ว +1

    There was an error running your collection: getaddrinfo ENOTFOUND reqres.inapi
    how can I solve this issue ?

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      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

  • @seemamotwani8451
    @seemamotwani8451 3 ปีที่แล้ว

    Hi Raghav, Is it possible to write back result to CSV file. Can you please share some details on it?

    • @RaghavPal
      @RaghavPal  3 ปีที่แล้ว +1

      Yes we can Seema, can check this community.postman.com/t/export-test-results-to-csv/1215

    • @seemamotwani8451
      @seemamotwani8451 3 ปีที่แล้ว

      @@RaghavPal thanks Raghav

  • @qusaiatoon2802
    @qusaiatoon2802 2 ปีที่แล้ว

    Hello,
    What if I want to pass an integer in the request body, I noticed that a double qouts is mandatory.
    I'd really appriciate your answer.

    • @RaghavPal
      @RaghavPal  2 ปีที่แล้ว

      Hi Qusai, should work with double quotes because the number without quotes is converted to a Javascript Number when the CSV gets parsed in the Postman app

  • @saurabhkeshri740
    @saurabhkeshri740 4 ปีที่แล้ว

    Not able to generate Newman report for the data driven tests run by Collection Runner.Please suggest. Thanks in Advance.

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      What is the error

  • @sherryraheem3603
    @sherryraheem3603 6 ปีที่แล้ว

    Hi Raghav,
    Just want to say thank, you made it very easy.

    • @RaghavPal
      @RaghavPal  6 ปีที่แล้ว

      You're welcome Sherry

  • @riteshbhadani6317
    @riteshbhadani6317 4 ปีที่แล้ว

    Really nice videos. I like the way you covered all the minors tricks. This video helped me a lot.
    Thanks Raghav.

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      You're welcome Ritesh

  • @fachrizalmasugi8703
    @fachrizalmasugi8703 4 ปีที่แล้ว

    ty sir ur explanation so good very helpful to undrstnd.

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      You are most welcome Fachrizal

  • @meghagowda9077
    @meghagowda9077 4 ปีที่แล้ว

    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 😊

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว +1

      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

    • @meghagowda9077
      @meghagowda9077 4 ปีที่แล้ว

      @@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😊

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      not yet Megha. Can find all here - automationstepbystep.com/

  • @chandanmusiclover
    @chandanmusiclover 4 ปีที่แล้ว +1

    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?

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      Hi Chandan, you can see these examples
      documenter.getpostman.com/view/5922408/RznJmGfn?version=latest

  • @priyankasalunkhe3789
    @priyankasalunkhe3789 3 ปีที่แล้ว

    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.

    • @RaghavPal
      @RaghavPal  3 ปีที่แล้ว

      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

  • @ksabita1
    @ksabita1 4 ปีที่แล้ว

    Hi Raghav, Thanks for the awesome video. You have explained very nicely. I have a question, when POST is sent (api/register/prepod)declaring the variable, I got below the error: {
    "error": "Note: Only defined users succeed registration"
    }.
    Body was: {
    "email": "{{email}}",
    "password": "{{password}}"
    }
    would you please shed some light in this? Cheers

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว +1

      Hi Sabita, pls check the values were referred correctly from the variables, You can make use of Console Output. Check this th-cam.com/video/ne1RsYcgkSY/w-d-xo.html
      If you still face issue, can try with a diff API

    • @ksabita1
      @ksabita1 4 ปีที่แล้ว

      @@RaghavPal Thanks Raghav, variable name was same as of another environment. I changed to something else now it is working. Cheers

  • @arvindram8
    @arvindram8 4 ปีที่แล้ว

    Hi Raghav In my case my project uses soap Webservices and rest API can I use postman in my case will postman be used to test soap Webservices as well

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว +1

      Yes, you can Arvind. Pls check SOAP video here - th-cam.com/play/PLhW3qG5bs-L-oT0GenwPLcJAPD_SiFK3C.html

    • @arvindram8
      @arvindram8 4 ปีที่แล้ว

      @@RaghavPal I already went through Raghav thanks it was very useful. Can postman be efficient for my project which has both rest and soap or can I use Soap UI free version

    • @arvindram8
      @arvindram8 4 ปีที่แล้ว

      @@RaghavPal Plz create a video series on fiddler tool using fiddler API testing becomes little easy

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว +1

      Sure I will do Arvind

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว +1

      Hi Arvind, I will suggest that you do a POC - Proof of Concept, i.e. use some good scenario of SOAP and REST api and do on Postman and SoapUI and see what works best for you. SoapUI is good for both, but the free version is very limited. Postman is better for REST

  • @mamtajeena5186
    @mamtajeena5186 4 ปีที่แล้ว

    Thank you Raghav, learnt so much from you. I have 1 question that How we can run same via Jenkins?

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      Hi Mamta, there is a video on that, Check the postman playlist here - automationstepbystep.com/

  • @DevasheeshSrivastavadevD
    @DevasheeshSrivastavadevD 5 ปีที่แล้ว

    hello raghav, is it exactly what we call as API AUTOMATION? I AM NEW TO IT SO PLEASE CLARIFY MY DOUBTS

    • @RaghavPal
      @RaghavPal  5 ปีที่แล้ว

      Hi Devasheesh, this is api web services, web services are services available over the web that help communicate between 2 or more applications. web servces is a type of api. I will suggest you can watch this - th-cam.com/play/PLhW3qG5bs-L9E2KV6vVdB-YTk-sRxmRAB.html

  • @avinashbaburavi
    @avinashbaburavi 4 ปีที่แล้ว +1

    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.

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      Hi Avinash, will plan to add a session on this

  • @immuind2009
    @immuind2009 3 ปีที่แล้ว

    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..

    • @RaghavPal
      @RaghavPal  3 ปีที่แล้ว

      Hi Imtiaz, do you have logs, can try to do the setup again

  • @EmanueleRotolo
    @EmanueleRotolo 4 ปีที่แล้ว

    Hi, thanks for the video. I'm getting unauthorized with a csv or json with a multiple row. The first row went fine but for the other i get unauthorized with no error. Iteration are correct. Did you have this kind of problem?

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      HI Emanuele, pls check postman console to verify what is the value referred. th-cam.com/video/ne1RsYcgkSY/w-d-xo.html

  • @jeanhxu
    @jeanhxu 4 ปีที่แล้ว

    love your class, short and useful!! thanks a lot!

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      You're very welcome Jean

  • @sudeepbasak1116
    @sudeepbasak1116 4 ปีที่แล้ว

    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.

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      Hi Sudeep, thanks for the message, you can check the test snippets in the test section

  • @sleep4046
    @sleep4046 4 ปีที่แล้ว

    Great video series, I've been crash coursing for a project and it's been really helpful!
    I'm having an issue with the 2 tests:
    tests["Contains Email"] = responseBody.has(data.email);
    tests["Contains Password"] = responseBody.has(data["password"]);
    For both tests I get: AssertionError: expected false to be truthy
    I checked the variable names in the data file and the Globals and everything is the same. I looked at the stack article you linked for other people who have had a similar problem and I didn't have much luck with debugging. Do you have any idea what the issue might be? Could you append the fix to the video description?
    Thanks for the video series and your help!

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว +1

      Hi, I will check on this and let you know as soon as I find something useful

    • @sleep4046
      @sleep4046 4 ปีที่แล้ว

      @@RaghavPal Okay thank you!

  • @md.mahfuzulhuqtalukder6644
    @md.mahfuzulhuqtalukder6644 4 ปีที่แล้ว

    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?

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว +1

      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

    • @md.mahfuzulhuqtalukder6644
      @md.mahfuzulhuqtalukder6644 4 ปีที่แล้ว

      Thank you so much

  • @macdonaldchigubhu7265
    @macdonaldchigubhu7265 4 ปีที่แล้ว

    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?

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      Hi, do you get successful response code and message, It may be issue from the backend.

  • @2glizzyy
    @2glizzyy 4 ปีที่แล้ว

    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?

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว +1

      Yes it is example of env PreProduction

  • @mlungisimabobo4544
    @mlungisimabobo4544 4 ปีที่แล้ว

    Hi Raghav, thank you so much for this tutorial once again...
    Now, I am struggling with running the on the Collection from command line using the external file...any idea how I can that?

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      Hi Mlungisi, 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

  • @jawadmisbah5203
    @jawadmisbah5203 4 ปีที่แล้ว

    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

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว +1

      Hi Jawad, I will check on this, May be some scripts will be required.

    • @meghagowda9077
      @meghagowda9077 4 ปีที่แล้ว

      @@RaghavPal Hi Raghav, even i am waiting for the scripts which reads the response body and export it to the csv file..

  • @saurabhjajoo9371
    @saurabhjajoo9371 6 ปีที่แล้ว

    Hi Raghav, what commands to use, if we need to run it(the data driven test) through command line. When running a collection from GUI, we are selecting the .csv file manually at runtime. Just wondering, how will the collection know, which file to pick, when we run this using command line.

    • @RaghavPal
      @RaghavPal  6 ปีที่แล้ว

      Hi Saurabh, you can use -d, --data flag from command line to give data file location

  • @monalikajain
    @monalikajain 4 ปีที่แล้ว

    Hi Raghav.... great learning from u..I hv one doubt in this vid...why use preprod at last in api???

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      Hi Monali, it was to refer the variable endpoint. You can replace with your url

    • @monalikajain
      @monalikajain 4 ปีที่แล้ว

      @@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.

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      This was just to demo how we may have to update part of the endpoint for diff env in real world

  • @shailendrakumaromkar
    @shailendrakumaromkar 3 ปีที่แล้ว

    Hi Raghav,
    I am using Postman v8.6.0.
    In Run Results for both iteration under Response Body it's saying "Response body was not logged"
    It's not showing the Response details.
    Can you please suggest what needs to be done here ?
    Thanks in advance.

    • @RaghavPal
      @RaghavPal  3 ปีที่แล้ว

      Hi Shailendra, check the console, if you got the response. th-cam.com/video/ne1RsYcgkSY/w-d-xo.html

    • @shailendrakumaromkar
      @shailendrakumaromkar 3 ปีที่แล้ว

      @@RaghavPal Thank You Raghav !!!!, able to see the Response Body in Postman Console.
      One observation related to Console detail -
      1) When open via Menu > View > Show Postman Console : Able to see all the details.
      2) When open Console from bottom left option, no detail are seen.
      Any reason for this ?

    • @RaghavPal
      @RaghavPal  3 ปีที่แล้ว

      this is weird, may be can report this to Postman team

  • @sagars3332
    @sagars3332 2 ปีที่แล้ว

    hi raghav you are keeping endpoint in csv file but while running scripts the endpoint is taken from global variable..so how to make script take endpoint from csv file?

    • @RaghavPal
      @RaghavPal  2 ปีที่แล้ว

      Like the data we are taking from csv in this example, you can take endpoint too

  • @geneyoo179
    @geneyoo179 6 ปีที่แล้ว

    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?

    • @RaghavPal
      @RaghavPal  6 ปีที่แล้ว

      You're welcome Gene. Yes variables should work in headers too. Try out.

  • @vinaykrishna297
    @vinaykrishna297 5 ปีที่แล้ว

    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?

    • @RaghavPal
      @RaghavPal  5 ปีที่แล้ว

      Hi Vinay, Try to not give any iteration count and check

  • @mazharkhan6177
    @mazharkhan6177 3 ปีที่แล้ว

    Hi Raghav , If I want to use the parameterised.csv file instead of environment.json file, then how to write in the csv format suppose eg: I have { base_url : "example.com", status: 200} how to write this in the csv and run with newman could please tell how to write in csvI have tried but unable to solve this please give an example

    • @RaghavPal
      @RaghavPal  3 ปีที่แล้ว

      Hi Mazhar, you will need to use variables with the same names as you have used headers in your csv. Not sure what exactly you have tried, Can also check some online examples

  • @sayalideshmukh9310
    @sayalideshmukh9310 5 ปีที่แล้ว +1

    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

    • @RaghavPal
      @RaghavPal  5 ปีที่แล้ว

      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

    • @sayalideshmukh9310
      @sayalideshmukh9310 5 ปีที่แล้ว

      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.

    • @RaghavPal
      @RaghavPal  5 ปีที่แล้ว

      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.

  • @RahulSharma-di4uh
    @RahulSharma-di4uh 6 ปีที่แล้ว

    Hi Raghav, could you please suggest is it possible in postman to get data from oracle dB (Sql Developer) and set that data as globals for further validations

    • @RaghavPal
      @RaghavPal  6 ปีที่แล้ว

      Hi Rahul, have not done it, check this link - blog.getpostman.com/2018/02/09/read-and-write-to-rest-enabled-databases/

  • @DhrumilSoni812
    @DhrumilSoni812 4 ปีที่แล้ว

    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?

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      Hi Dhrumil, pls check the iteration count you have given

  • @alessia6715
    @alessia6715 4 ปีที่แล้ว +2

    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.

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว +2

      Yes Alessia, there may be some changes.

  • @rascalenters
    @rascalenters 5 ปีที่แล้ว

    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

    • @RaghavPal
      @RaghavPal  5 ปีที่แล้ว +1

      HI, I will have to test and check this scenario. Meanwhile also try online help

    • @rascalenters
      @rascalenters 5 ปีที่แล้ว

      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

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      Okay, I will need to check on this when I get some time

  • @rohanytc
    @rohanytc 4 ปีที่แล้ว

    Hi, I have an api request which is configured to fetch values from CSV file and it runs well using collection runner but when I run the api individually by clicking on send button it shows an error because the values from CSV file are not accessible. Is there a way to solve this problem?

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      Hi Rohan, you can put the values in the variables, (current value) when running individually and when running from collection runner can use csv

    • @rohanytc
      @rohanytc 4 ปีที่แล้ว

      @@RaghavPal Thanks for replying, but my requirement is to implement api automation using Newman and to use environment variables at the minimum. Can there be another alternative to run a single api request having variable references from CSV file without any issue?

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      if you are running from newman, can use the arguments. 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

  • @soujanyaraj8424
    @soujanyaraj8424 4 ปีที่แล้ว +1

    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

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      Hi Soujanya, have you checked if the variable names are correct and there is no type or spaces, Also try to debug th-cam.com/video/ne1RsYcgkSY/w-d-xo.html
      This may also help - stackoverflow.com/questions/54352177/postman-test-failure-false-to-be-truthy

  • @malsongraca6236
    @malsongraca6236 6 ปีที่แล้ว

    Hi Raghav, Thank you so much for this great tutorial. I am wondering why my running results only taking into account the first row data, even though it shows 2 iterations results but both show the data from the first row. Thanks

    • @RaghavPal
      @RaghavPal  6 ปีที่แล้ว

      Hi Malson, when you select your file in collection runner, do you get the view of all the data

    • @malsongraca6236
      @malsongraca6236 6 ปีที่แล้ว

      Hi Raghav, Thanks for a prompt reply. Yes, when I select the file in collection runner I get the view of all data in the preview data window. However, once I run it I see 2 iterations in the run results window but both displaying the first row data.

    • @RaghavPal
      @RaghavPal  6 ปีที่แล้ว

      Try to manually give the iteration count in the iteration field and check

  • @shashankchougule3653
    @shashankchougule3653 4 ปีที่แล้ว

    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"}

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      Hi Shashank, pls try setting the iteration count in collection runner

  • @hassanhashem8435
    @hassanhashem8435 5 ปีที่แล้ว

    Hi Raghav , i got confused , you mention the environment name " prepod" in the endpoint variable , also there is ENV varilable has environment name , also there is excle file contains other data
    Kindly advice.

    • @RaghavPal
      @RaghavPal  5 ปีที่แล้ว

      Hi Hassan, pls help me to understand your issue in detail. Here I have shown how you can get values for variables from a csv/excel file

    • @hassanhashem8435
      @hassanhashem8435 5 ปีที่แล้ว +1

      Thanks Raghav , I got it

  • @vijaykumar-ut1ze
    @vijaykumar-ut1ze 4 ปีที่แล้ว

    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

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      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

  • @sridharmurari3007
    @sridharmurari3007 2 ปีที่แล้ว

    Ragav how do we store json file to part of build than storing in local dir

    • @RaghavPal
      @RaghavPal  2 ปีที่แล้ว

      Hi Sridhar, are you asking specific to Postman, I will need to check on that

  • @elenarohrer5007
    @elenarohrer5007 3 ปีที่แล้ว

    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?

    • @RaghavPal
      @RaghavPal  3 ปีที่แล้ว

      Hi Elena, no actually we are trying to check the presence of the parameter, These are 2 ways of doing that

  • @hemalathamanokaran8799
    @hemalathamanokaran8799 6 ปีที่แล้ว

    Hi,
    How can we capture the response body results of few paramaters only in .csv .
    Eg: In the demo you have shown for emailid and password in the request and the response can be seen in response body. If i need to capture those emailid and password which is in the response body separately like in .csv file or any other file formate.Do we have any option like this.Can you please help me on this query?

  • @sudheerdivi6777
    @sudheerdivi6777 4 ปีที่แล้ว

    Hi, I have a question. Can we run the data driven collections in iterations using --n. I tried but the Api is taking last parameter in data file.

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      Hi Sudheer, Can you show exactly how are you running it

  • @raviforever14
    @raviforever14 4 ปีที่แล้ว

    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.

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      Hi Ravi, have you checked if the variable names are correct and there is no type or spaces, Also try to debug th-cam.com/video/ne1RsYcgkSY/w-d-xo.html
      This may also help - stackoverflow.com/questions/54352177/postman-test-failure-false-to-be-truthy

  • @MohaideenA
    @MohaideenA 6 ปีที่แล้ว

    Hi Ragav, This POC is working fine, but I'm wondering how to integrate this logic when I want to run postman automatically , i.e. via Jenkins..
    Here I had to select the file every time when I try to run the post request, which is tedious, so just checking on how to automate the file upload process at once in local, and how to automate this case in Jenkins, as we cant to each request to upload its specific file.
    Please let me know.

    • @RaghavPal
      @RaghavPal  6 ปีที่แล้ว

      Hi Mohaideen, not sure if I got you correctly, but if you are trying to do this via jenkins you can give the location of file in the command. You can also store the file into a github repo and in jenkins job get the latest file from github and run it.

    • @MohaideenA
      @MohaideenA 6 ปีที่แล้ว

      Hi Ragav, I meant how to automate the process of selecting the json file,, requesting since there is no save option, from what I could see , we are loading the file again and again whenever we are clicking run..
      To be exact, How to automate the step in 12.34 ?

    • @RaghavPal
      @RaghavPal  6 ปีที่แล้ว

      Okay that you can do from command line

    • @saurabhjajoo9371
      @saurabhjajoo9371 6 ปีที่แล้ว

      Hi Mohaideen - you can use below command
      newman run -d "csv/json file path" "Collection name"

  • @Lokesh.Mittal
    @Lokesh.Mittal 4 ปีที่แล้ว

    Hi Raghav, I have a query that if I wanna check a particular value in response for every iteration that what should I do. e.g my endpoint is sandbox-test.com/id/12345
    and response have an "id": "12345"

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      Hi Lokesh, in case the value is fixed you can just put this in a variable and in the test section add a script to verify the value from response against this. Session 9 and 10 here will help - th-cam.com/play/PLhW3qG5bs-L-oT0GenwPLcJAPD_SiFK3C.html

  • @gorakhparve7090
    @gorakhparve7090 2 ปีที่แล้ว

    In case excel/csv file having multiple sheet and we have fetch 2nd number sheet then how can we handle this situation in newman runner

    • @RaghavPal
      @RaghavPal  2 ปีที่แล้ว

      Hi Gorakh, as far as I know there is no direct way to do this, will need to do this through scripting, can check some examples online,

  • @veenayadav6995
    @veenayadav6995 3 ปีที่แล้ว

    I tried as u recommended bt still I am not able to compare external json data file with internal response json data. I am not setting enviournment variables as it has multiple response values. This is the code which I tried "pm.expect(jsonData.responseBody[0].logo).to.equal(pm.iterationData.get("logo, somevalue"));". Any idea abt the same will be more helpful to me. Thanks

    • @veenayadav6995
      @veenayadav6995 3 ปีที่แล้ว

      Sorry my issue has been resolved

    • @RaghavPal
      @RaghavPal  3 ปีที่แล้ว +1

      Great Veena, all the best