Data-driven testing using Postman

Data-driven testing can be a very effective approach in testing an API against different data-sets.
Postman collection and the data file: gist.github.com/vdespa/74e21d...
___
// POSTMAN COMPLETE GUIDE ONLINE COURSE
👉 Want to learn more about Postman? Check my Postman online course.
Get it at a special price and help support this KZread channel:
vdespa.com/courses/?q=KZread
___
// I HAVE A QUESTION!
I do my best to answer all comments here on KZread but I cannot make any guarantees.
If you have a question, it is best to ask your question on the Postman User Group on Facebook or on the Postman Community (links below).
If you have purchased the Postman Online Course, please use the Q&A section or send me a message on Udemy.
Please do not email me or contact me on other channels as I might not be able to answer. Sorry!
___
// I HAVE A VIDEO IDEA
Do you want me to create a video on a specific topic? Just fill out the form below:
forms.gle/uWEzXFQ2viJtZtvZ7
___
// P L A Y L I S T S
▸ Learn Postman | bit.ly/2CFaf70
▸ Postman Crash Course | bit.ly/2YwEBBT
▸ Postman Tips & Tricks | bit.ly/2JLkXyU
___
// F R E E R E S O U R C E S
▸▸▸ DOWNLOAD the FREE Postman Quick Reference Guide
bit.ly/postman-quick-reference-yt
▸▸▸ Ask a question on Discord (unofficial)
/ discord
▸▸▸ The OFFICIAL Postman community forum
community.getpostman.com/
▸▸▸ 👉 Subscribe to the "Testing and automation with Valentine" newsletter for bi-weekly tutorials, tips, and news from the industry.
eepurl.com/gPwpU1
___
// YOUR SUPPORT ON PATREON MATTERS
If you enjoy this content, help me create more like this. Consider supporting me on Patreon.
/ vdespa
___
// IMPRINT
vdespa.com/imprint
---

Пікірлер: 146

  • @vdespa
    @vdespa3 жыл бұрын

    👉 Want to learn more about Postman? Check my complete Postman online course. vdespa.com/courses/?q=KZread

  • @merman3804

    @merman3804

    3 жыл бұрын

    I have a typeError: TypeError: Cannot read property 'id' of undefined

  • @samsonuteh3186
    @samsonuteh3186 Жыл бұрын

    YOU JUST SAVED ME HOURS OF TOILING!!! I WAS TRYING TO GET A WAY TO CHECK IF THE DATA SUPPLIED IS THE SAME AS THAT RETURNED AND YOU SPOKE ABOUT IT. THANKS A MILLION!!!

  • @vdespa

    @vdespa

    Жыл бұрын

    I appreciate your enthusiasm! Thanks for your comment.

  • @yulietsosa9972
    @yulietsosa99722 жыл бұрын

    Excellent, from your example, I was able to load data from a .csv, but not only to load it from the Body, but as a pre-request-scritpt and as an expected value in the response. Thank you very much

  • @vdespa

    @vdespa

    2 жыл бұрын

    Congrats, I am glad it helped.

  • @user-zv7bq9ft2j
    @user-zv7bq9ft2j Жыл бұрын

    Great video, thanks! Content matches total length of this video :P

  • @vdespa

    @vdespa

    Жыл бұрын

    You are welcome. Thank you for leaving a comment.

  • @yogiswaru5272
    @yogiswaru52722 жыл бұрын

    It was really helpful as I was wondering how to create multiple profiles using dynamic data and assert the same in single api call

  • @ismetince
    @ismetince3 жыл бұрын

    Thank you for making great tutorials. Excellent video!

  • @vdespa

    @vdespa

    3 жыл бұрын

    Glad you like them!

  • @cassandraz3035
    @cassandraz30353 жыл бұрын

    you're so easy to listen to. You should narrate childrens books, too :) Thanks for making Postman easier!

  • @vdespa

    @vdespa

    3 жыл бұрын

    Thanks 👍

  • @romalkamble2401
    @romalkamble24013 жыл бұрын

    This is amazing quick tutorial, really helpful.

  • @vdespa

    @vdespa

    3 жыл бұрын

    I am glad it helped. Thanks for watching.

  • @JohnDoe-ln1on
    @JohnDoe-ln1on3 жыл бұрын

    Thanks a lot for your work, Valentin!

  • @vdespa

    @vdespa

    3 жыл бұрын

    Thank you too!

  • @meghasandesam
    @meghasandesam3 жыл бұрын

    by today i completed all your video series from 1 to 55..nice exaplanation. Thank you very much dear Valantine..!!!

  • @vdespa

    @vdespa

    3 жыл бұрын

    Great job! Thanks for watching so many videos.

  • @meghasandesam

    @meghasandesam

    3 жыл бұрын

    @@vdespa i spend almost 20 days...thanks you for the response and your KT.

  • @ruanmenezes7683
    @ruanmenezes76833 жыл бұрын

    Very nice video. Thanks Valentin, hello from BRAZIL

  • @vdespa

    @vdespa

    3 жыл бұрын

    Obrigado por assistir!

  • @BrendanMetcalfe
    @BrendanMetcalfe3 жыл бұрын

    I like how you do the zoomed-in screen. Nice vid !

  • @vdespa

    @vdespa

    3 жыл бұрын

    I'm glad you like it

  • @abtville
    @abtville11 ай бұрын

    just what i needed for my tests!

  • @vdespa

    @vdespa

    11 ай бұрын

    Glad that you liked it. Thank you for leaving a comment.

  • @tihraquamahdi8515
    @tihraquamahdi8515 Жыл бұрын

    Thank you very much, this is really helpful

  • @vdespa

    @vdespa

    Жыл бұрын

    Glad it was helpful! You are welcome. Thank you for leaving a comment.

  • @giridharg104
    @giridharg1042 жыл бұрын

    love it. it helped me greatly

  • @vdespa

    @vdespa

    2 жыл бұрын

    Great to hear that. I am glad that it was helpful.

  • @MIt-ql5bo
    @MIt-ql5bo3 жыл бұрын

    very helpful, i like your series...

  • @vdespa

    @vdespa

    3 жыл бұрын

    Thank you very much!

  • @afolabidimeji313
    @afolabidimeji313 Жыл бұрын

    Hi Valentin, Thank you for the video. If I have multiples endpoints in a collection, does it mean I have to have a csv file for each endpoint. And if I were to do a regression test on all those endpoints, what approach would you suggest?

  • @smanap3859
    @smanap3859 Жыл бұрын

    great content and presentation

  • @vdespa

    @vdespa

    Жыл бұрын

    Much appreciated! You are welcome. Thank you for leaving a comment.

  • @emmanuelrubio8593
    @emmanuelrubio85932 жыл бұрын

    Thanks so much ! :)

  • @vdespa

    @vdespa

    2 жыл бұрын

    I am glad it helped.

  • @samueljegan1172
    @samueljegan117211 ай бұрын

    Thanks for the detailed Video . Is it possible to use the data from excel which will be available only in the response which needs to be validated ? For eg I am passing name and student I’d in the request and I am getting score in the response . I want to validate the score in response against the expected score (available in csv) . Is it possible to use variables in params when not I used in request

  • @abdas1349
    @abdas1349 Жыл бұрын

    Exactly helpful

  • @vdespa

    @vdespa

    Жыл бұрын

    Glad you think so! You are welcome. Thank you for leaving a comment.

  • @Zahira85Zen
    @Zahira85Zen3 жыл бұрын

    Very helpful tips! Could you please share which tool you used for writing and saving json/csv files? It was difficult to catch from the video.

  • @vdespa

    @vdespa

    3 жыл бұрын

    Thanks for watching. I have used the Atom text editor, which is free. atom.io/

  • @victorviejog
    @victorviejog Жыл бұрын

    Thank you very much for the video, I love it I had the following doubt I'm posting XML to a web service. I would like to use Runner to send multiple requests using a datafile. The {{VAR}} syntax works great for JSON but doesn't seem to for XML? Is this possible?

  • @abigailrosales5690
    @abigailrosales5690 Жыл бұрын

    Thanks! I help myself too much yo understand.

  • @vdespa

    @vdespa

    Жыл бұрын

    Glad that it helped. You are welcome. Thank you for leaving a comment.

  • @user-qx6wg1ky6i
    @user-qx6wg1ky6i Жыл бұрын

    Hi @vdespa, Can you please let me know how we can read data from excel files and that too will be a file paths in each row? Thanks in advance !

  • @mogliff3414
    @mogliff34143 жыл бұрын

    Much needed

  • @vdespa

    @vdespa

    3 жыл бұрын

    Thanks!

  • @ksuneetha
    @ksuneetha Жыл бұрын

    Your videos are awesome. 1)Could you share what are the challenges you faced in api testing using postman. 2) What is the interesting bug you found while api testing using postman, appreciating if you could share your thoughts. Thank you.

  • @vdespa

    @vdespa

    Жыл бұрын

    Thanks for the appreciation. The biggest challenge is when you use Postman to the maximum and discover its bugs or limitations. The most interesting bugs are the ones that are hard to replicate.

  • @ksuneetha

    @ksuneetha

    Жыл бұрын

    @@vdespa Thank you.

  • @vaddisushma9016
    @vaddisushma90163 жыл бұрын

    Thank you so much for the video Valentin. Quick question though, Is there a way I can add the pass/fail status of my postman tests to my csv file? If yes, how do I do it? Is there a command or do you have a video explaining it? Thank you in advance

  • @vdespa

    @vdespa

    3 жыл бұрын

    You can't directly write to files from Postman. To do something like this, you need to build some custom scripts using Node.js, Newman and JavaScript.

  • @TheChikabum
    @TheChikabum2 жыл бұрын

    Great video! What's the best way/tool to perform a data-driven test concurrently with varying post request bodies?

  • @vdespa

    @vdespa

    2 жыл бұрын

    Thanks for watching. Try the solution proposes to your own problem and see if it works.

  • @positivenergylife
    @positivenergylife3 жыл бұрын

    Great!!!

  • @shanewoodley2920
    @shanewoodley29202 жыл бұрын

    Dear Valentin, I am trying to figure out how to loop through response body parameters under one global variable that are coming from a csv so the I can update all of my tests in a collection easier if a response body parameter changes. Let me know if you have any insight on this? Thanks, great video.

  • @vdespa

    @vdespa

    2 жыл бұрын

    Hey Shane, thanks for asking. Maybe you can share more details about this on the Discord channel (link in the description).

  • @shireeshasooram9995
    @shireeshasooram99953 жыл бұрын

    its just an awesome vedio...

  • @vdespa

    @vdespa

    3 жыл бұрын

    Many many thanks

  • @teleport96
    @teleport963 жыл бұрын

    Please, try to investigate if it is possible to send requests with the help of pm.sendRequest Synchronously. That would be extremely helpful! And thank you for the video!

  • @vdespa

    @vdespa

    3 жыл бұрын

    I don't think this is possible. Use regular Postman requests and chain them.

  • @MIt-ql5bo
    @MIt-ql5bo3 жыл бұрын

    Could you please explain how to use an external json file when my collection runner has to run multiple request, holding the data in different CSV-files?

  • @vdespa

    @vdespa

    3 жыл бұрын

    Postman can only work with one file at the time. The best way to approach this is to have a processing step before that merges the files into a single one. Join the Facebook community (see link in the description) and ask your question there. Consider adding more details, including screenshots.

  • @alek.i
    @alek.i3 жыл бұрын

    Good stuff. Is it possible to use in this way nested data from the json data file? When trying to use such a file, postman seems to understand only the data from the first level. Using the preview, all the nested data is seen as a string, not as separate variables :(

  • @vdespa

    @vdespa

    3 жыл бұрын

    Yes, you can use nested variables, but this does not mean that Postman will do magic with it. You can "prepare" the data in the pre-request script as you need it.

  • @alek.i

    @alek.i

    3 жыл бұрын

    @@vdespa how can I reach for the data in datafile in pre-reguest scripts? It's not part of the response, so responseBody won't work. Postman sees first level data from the file as variables but all nested data is seen under "top level" variable f.e. Person [{"name":"Joe", "age":20}]

  • @chomputre
    @chomputre3 жыл бұрын

    Thank you for the video. I have question, can data driven use in params instead of request body?

  • @vdespa

    @vdespa

    3 жыл бұрын

    Sure, why note. You can use Postman variables ANYWHERE in the request.

  • @ckgal
    @ckgal3 жыл бұрын

    Thanks for this video. However, how can we write test scripts based on different data sets? e.g. test scripts for invalid name case, invalid email case, success case etc based on the data.csv via runner?

  • @vdespa

    @vdespa

    3 жыл бұрын

    Writing tests based on different data sets follows the same principle.

  • @kumard.h6073
    @kumard.h60733 жыл бұрын

    I am not able to pass true/false values from CSV to postman.please help

  • @vibhorsharma2436
    @vibhorsharma24363 жыл бұрын

    Hi @valentin Despa, this is amazing video I have one query let suppose i have multiple GET ALL request and for every request i have to pass different data, so can we create one .csv file and use different work sheet for, if it is possible, who can we do this. Or is any other way (because in my collection there are multiple GET ALL Request and I need to run in one time

  • @vdespa

    @vdespa

    3 жыл бұрын

    fb1

  • @samsonuteh3186
    @samsonuteh31863 жыл бұрын

    Thank you Valentin for the video. I have tried this test on a different API but keep getting errors. First question I have is why it is returning a status code of 200 when it is a POST request? Also, when I checked my database, the created data is not showing (The response body on postman is always null). Finally, I got this error (I did a post request on creating a question and storing it in the database. The name of the parameter is Question): Create question | TypeError: Cannot read property 'Question' of undefined

  • @vdespa

    @vdespa

    3 жыл бұрын

    I am sorry you are getting some errors. Before looking into data-driven approaches, make sure you API works with static data. Join the Facebook community (see link in the description) and ask your question there. Consider adding more details, including screenshots. Thanks for understanding.

  • @KenVillines
    @KenVillines Жыл бұрын

    Question: is there a way to save the data file the collection so you don't have to reopen it every time?

  • @vdespa

    @vdespa

    Жыл бұрын

    Hi Ken, this is a good question. The data file is not tied to the collection itself, so it's location can't really be persisted. Most of the time, it is best to use Newman to automate the run.

  • @chanduch1038
    @chanduch10383 жыл бұрын

    Hi @Valentin despa I have executed requests just as you have shown,but I am receiving the typeerror :Cannot read property 'id' of undefined,could you suggest me for further running of tests

  • @vdespa

    @vdespa

    3 жыл бұрын

    Can you rewatch the video to see if it is really exactly as shown?

  • @surajshirke8502
    @surajshirke85023 жыл бұрын

    Hi @Valentin Despa Can you please provide Coupon code for your Postman: The Complete Guide - REST API Testing Course which is available on UDEMY ?? I really wanted to learn API testing using Postman

  • @vdespa

    @vdespa

    3 жыл бұрын

    Hi Suraj, please got to vdespa.com/courses/ - I am publishing coupons there from time to time.

  • @aakashjain4437
    @aakashjain44373 жыл бұрын

    Hi Valentin, love the way you explain.I have one query and I am sure you gonna be help out asap. Query- As above video you have achieved data-driven approach through .CSV file. Gave the request values through .CSV file. What about response body?Basically I use GET method mostly where I need to verify the Response body. I want now to verify response body dynamically, How I can achieve?Through the .CSV we can do it? Looking forward!!

  • @vdespa

    @vdespa

    3 жыл бұрын

    Thanks for your appreciation. Yes, you can verify the response. You can use pm.iterationData.get() to get a value that contains the expected response.

  • @aakashjain4437

    @aakashjain4437

    3 жыл бұрын

    @@vdespa But want to do through dat driven(.csv file)

  • @romalkamble2401

    @romalkamble2401

    3 жыл бұрын

    @@aakashjain4437 - you can load the csv file and write something like this in your test - pm.expect(response.json.).to.eql(pm.iterationData.get())

  • @ravindragurajala6637
    @ravindragurajala66373 жыл бұрын

    Hi Despa, I want to read the data row wise based on header for the same collection for the same row with different headers. Is it possible (Ex : 1st row 4 headers same collection should be run with different header value at a time only one)

  • @vdespa

    @vdespa

    3 жыл бұрын

    Hi, how is this different from the example provided?

  • @akshaypatil4002
    @akshaypatil40022 жыл бұрын

    Hello @valentine Despa i have a question how to pass data to multiple requests from the JSON file as currently i am importing only single file

  • @vdespa

    @vdespa

    2 жыл бұрын

    It is hard to answer this with the given information. Join the Discord community (see link in the description) and ask your question there. Consider adding more details, including screenshots. Thanks for understanding.

  • @bjananigayathri
    @bjananigayathri2 жыл бұрын

    Hi , Could you also explain how to Import json files with Nested array values ?

  • @vdespa

    @vdespa

    2 жыл бұрын

    Take a look at this tutorial: kzread.info/dash/bejne/f4OYr62rmre1mZc.html

  • @rahulprinjay1
    @rahulprinjay13 жыл бұрын

    I have different version of the same API. I have some test cases written in first version of the API. How to move them to the second version of the API. Thanks

  • @vdespa

    @vdespa

    3 жыл бұрын

    Not sure what you mean by that. Join the Facebook community (see link in the description) and ask your question there. Consider adding more details, including screenshots. Thanks for understanding.

  • @rahulprinjay1
    @rahulprinjay13 жыл бұрын

    My response has the string "3-ABC Test" when I hard code this value for the match with response. It passes my test case. But when I read this value from .csv file. It fails. While if the value is just "Test" is passes the test case after reading from .csv file. Is there any difference in how postman read sting data with space or an special character in postman.

  • @vdespa

    @vdespa

    3 жыл бұрын

    It is hard to know what the problem is in this case. Join the Facebook community (see link in the description) and ask your question there. Consider adding more details, including screenshots. Thanks for understanding.

  • @satishtesting19
    @satishtesting19 Жыл бұрын

    I have a request body as below { "Name": { "Fname": "Shyam", "lastname": "Raj" }, "DOB": { "Date": "08", "Month": "12", "Year": "1994" } } how can i test it. some times I need to remove complete object to test. ex: with DOB

  • @shilpimishra9792
    @shilpimishra97923 жыл бұрын

    I follow your steps, but no result is showing in pass & fail, only getting responce 200/400, & receiving message "not have any test", plz help me to know how to validate if we are entering wrong format of email id in csv file?

  • @vdespa

    @vdespa

    3 жыл бұрын

    It is hard to know what the problem is in this case. Join the Facebook community (see link in the description) and ask your question there. Consider adding more details, including screenshots. Thanks for understanding.

  • @melissajesnowski4226
    @melissajesnowski42262 жыл бұрын

    This was a lifesaver! I need help on this scenario: What if I want to skip an empty array in a json file? For example, my file contains a discounts array that does not require values so some of them are blank. Please help, it's driving me crazy! :)

  • @vdespa

    @vdespa

    2 жыл бұрын

    Thanks for watching, Melissa. Consider joining the Discord channel and sharing some additional details there.

  • @user-yg3xd9ln5k
    @user-yg3xd9ln5k8 ай бұрын

    Does postman support data driven testing when the request is a list rather than a string?

  • @vdespa

    @vdespa

    8 ай бұрын

    What do you mean by "request is a list"?

  • @abhisekbanerjee3369
    @abhisekbanerjee33692 жыл бұрын

    How to read value from multiple sheets within one csv file please ? How to provide the sheet name in postman please

  • @vdespa

    @vdespa

    2 жыл бұрын

    I have not seen any CSV files with multiple sheets.

  • @craveitmakeiteatit
    @craveitmakeiteatit2 жыл бұрын

    Hello sir, I have a case where I have to pass different query params for multiple GET endpoints. How can I pass that using a CSV file? Today I tried this method but did not work. This is my case for the first endpoint, I want to read A1, A2, A3 and for the second GET endpoint, I want to read from B1, B2, B3. Is it possible?

  • @vdespa

    @vdespa

    2 жыл бұрын

    Join the discord server and share more details there. Link in the description.

  • @craveitmakeiteatit

    @craveitmakeiteatit

    2 жыл бұрын

    @@vdespa Thank you! I've shared on discord

  • @ravindragurajala6637
    @ravindragurajala66373 жыл бұрын

    I mean until unless all the variables used in single payload the values will not loaded This is my concern which we have used in csv file.Is it correct

  • @vdespa

    @vdespa

    3 жыл бұрын

    You you please clarify this? I am not sure what you mean.

  • @rohanytc
    @rohanytc3 жыл бұрын

    Hi Despa, 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?

  • @vdespa

    @vdespa

    3 жыл бұрын

    Define the variables in the collection so that it works in Postman as well - if you really need this.

  • @rohanytc

    @rohanytc

    3 жыл бұрын

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

  • @anjanar3053
    @anjanar30533 жыл бұрын

    Hi ,Can we store data file inside Postman or is there any option to use data file without saving in local to use it for integration with Jenkins.

  • @vdespa

    @vdespa

    3 жыл бұрын

    You could store that in a variable but it would more more inconvenient.

  • @anjanar3053

    @anjanar3053

    3 жыл бұрын

    @@vdespa Thank you for your reply.Let me clarify your point,so I should use my local folder path where my data file is saved in my newman command to execute it in jenkins.Is that right?Because I can see options for generating API key and can get the url for collection and environment and no option for getting test data like that,which is blocking for me to proceed.

  • @vdespa

    @vdespa

    3 жыл бұрын

    @@anjanar3053 There are many aspects to be explained. I have documented everything in the course.

  • @anilkumaryadav106
    @anilkumaryadav1063 жыл бұрын

    Hi valentin, I have one query. Suppose i want to check on the response status code and the basis that i want to run the test cases. ======================== suppose for resposne code 501 and 500 , I just want to print some message in log but other than these two codes, i want to execute test as below. But this is not working. if( pm.response.to.have.status(501)){ console.log("The response code is 501, please check. ") } else if ( pm.response.code.equal(500)) { console.log("The response code is 500, please check. ") } else { const response=pm.response.json(); var responseMessage =response.message; console.log("Response message is : "+responseMessage) var responseBookingID =response.BookingId; console.log("Booking ID for iteration no "+ iterationNoToShow +" is :" + responseBookingID); pm.test("Verify that booking is posted successfully ",function() { pm.expect(responseMessage).to.equal("Booking created successfully") } )

  • @shivanipremi2019
    @shivanipremi20193 жыл бұрын

    Can i asynchronously schedule my request after 30 mins from postman collection runner ? (without blocking the other requests)

  • @vdespa

    @vdespa

    3 жыл бұрын

    I don't think this is possible. Why 30 minutes?

  • @sumitpatra2418
    @sumitpatra24182 жыл бұрын

    Instead of creating files like .json or .csv can we do the above internally in postman like write those in the body section

  • @vdespa

    @vdespa

    2 жыл бұрын

    Yes, but that will create a single iteration. This approach is useful when you want to reuse the same address with different data.

  • @sumitpatra2418

    @sumitpatra2418

    2 жыл бұрын

    @@vdespa Do you have a video on that please or can you please share how to do that in a single post request...

  • @vdespa

    @vdespa

    2 жыл бұрын

    @@sumitpatra2418 i have 1-2 videos on my channel. You will have to search for them.

  • @TheTreborMedia
    @TheTreborMedia Жыл бұрын

    cool

  • @vdespa

    @vdespa

    Жыл бұрын

    You are welcome. Thank you for leaving a comment.

  • @martinrmpardedepardede7431
    @martinrmpardedepardede74312 жыл бұрын

    ​ @Valentin Despa hai bro, can you help me? how to get newman htmlextra report on colection postman with json table data like this program you made?

  • @martinrmpardedepardede7431

    @martinrmpardedepardede7431

    2 жыл бұрын

    if i run the colection it dont ask for the table data so it only give 1 iteration, i have many data iteration in the table

  • @vdespa

    @vdespa

    2 жыл бұрын

    @@martinrmpardedepardede7431 Not sure what you mean. Join on Discord and share more details here.

  • @martinrmpardedepardede7431

    @martinrmpardedepardede7431

    2 жыл бұрын

    @@vdespa oke bro thanks. i've send it in the discord. I have searched on google but can't find the solution

  • @rahulprinjay1
    @rahulprinjay13 жыл бұрын

    Hi Valentin, Can we input the query and path params for GET request from excel file. Thanks

  • @vdespa

    @vdespa

    3 жыл бұрын

    Yes, absolutely.

  • @rahulprinjay1

    @rahulprinjay1

    3 жыл бұрын

    @@vdespa Thanks, I got that Fixed. But how to use the single .csv file with multiple sheet for different requests. Basically I have two GET requests. First request works fine as it reads the data from .csv. Now I have data for another GET request in the second sheet how to let Postman know the data for second GET request is on the second sheet. Thanks

  • @vdespa

    @vdespa

    3 жыл бұрын

    @@rahulprinjay1 please ask in the Facebook group.

  • @swapnilsonawane2525
    @swapnilsonawane25252 жыл бұрын

    what if we have to post the request body different every time for the same API.

  • @swapnilsonawane2525

    @swapnilsonawane2525

    2 жыл бұрын

    i mean not every time, but suppose my API can consume 2 type different body request. so then how we can take the data-drivent test from json file.

  • @vdespa

    @vdespa

    2 жыл бұрын

    You can add the full JSON body to the file.

  • @phucpham6373
    @phucpham63732 жыл бұрын

    Hello, I have a question for you. How can i handle dynamic response status via CSV file?

  • @vdespa

    @vdespa

    2 жыл бұрын

    Depends what you want to assert. An example would be useful.

  • @phucpham6373

    @phucpham6373

    2 жыл бұрын

    @@vdespa Same with you example,In CSV data file i have one more "status" collum. Interation, name, email, age and status(200, 201, 400) for each interation. How can i test difference response code?

  • @phucpham6373

    @phucpham6373

    2 жыл бұрын

    @@vdespa pm.test("Status code is {{status}}", function () { pm.response.to.have.status({{status}}); }); I want to compare status which i got from server with csv file for each case

  • @vdespa

    @vdespa

    2 жыл бұрын

    @@phucpham6373 {{varname}} does not work from scripts.

  • @phucpham6373

    @phucpham6373

    2 жыл бұрын

    If i add a collum "status" into csv file, it include some status(200, 201, 400). How can i handle dynamic response status?

  • @kumard.h6073
    @kumard.h60733 жыл бұрын

    Can we so the same with an excel file ?

  • @vdespa

    @vdespa

    3 жыл бұрын

    No. You need to export the Excel file in the CSV format.