Postman - Running a request multiple times with different data sets (API testing)

preview_player
Показать описание
In this video, I will show you how you can take advantage of pre-request scripts and workflows in Postman to submit the same request over and over again but with different data each time.

If this was helpful and you want to support me create more videos like this one, please consider subscribing.

--

⭐️ 🎓 The complete guide to Postman (online course) ⭐️

Want to learn more about Postman? Check my Postman online course.

Get it at a special price and help support this YouTube channel:

--

⭐️ 💬 I have a question. ⭐️

I do my best to answer all comments here on YouTube but I cannot make any guarantees.

If you have a question, it is best to ask your question on Discord, on the Postman User Group on Facebook, or on the Postman Community (links below).

If you are asking a question, make sure to include as many details as possible, including screenshots.

If you have purchased the Postman online course, please use the Q&A section or send me a message directly.

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:

--

⭐️ 📺 Learn Postman on YouTube ⭐️

Collection of video tutorials:

___

⭐️ 📕 Free resources ⭐️

📌 DOWNLOAD the FREE Postman Quick Reference Guide

📌 Ask a question on Discord (unofficial)

📌 Join the Postman User Group on Facebook (unofficial)

📌 Postman community forum (official)

--

⭐️ 📩 Contact & Imprint ⭐️

👉 Let's be friends

👉 Follow me on Twitter:

👉 Follow me on Medium:

👉 Follow me on Facebook:

👉 Let's connect on LinkedIn:

Рекомендации по теме
Комментарии
Автор

Download the FREE Postman Quick Reference Guide

vdespa
Автор

Hello Valentine, I tried almost the same thing i.e passing an array of values to an api and when i executed the same API i got a message "There are no test for this request". Why am i getting this message?

simplearora
Автор

Thanks for the guide. I followed it from the start to finish, however when I try to run the collection, my request is executed only once and I see the "No tests found" message. Any ideas what is wrong?

zom
Автор

Michas gracias, me ayudo mucho con este ejemplo para aplicarlo. Excelente tutorial

LaTernurin
Автор

Thank you for this helpful video. I chose to use:
if (companies instanceof Array && companies.length > 0) {
and:
if (!(companies instanceof Array)) {
instead of truthy evaluation because maybe some non-array value could evaluate to true.

OliverUnderTheMoon
Автор

I am using the same code to insert [ "7666", "3333", "6667"] values and running through collection runner but I see only one request being called and the other are not even shown. Please help me

sowmyakalvagadda
Автор

What should i do when i have multiple variables to be changed. Example company name and address

meandherforeternity
Автор

I have followed your example exactly as you've coded, but my post only runs once and stops after Google.

christopherhoup
Автор

I am unable to pass multiple values using the approach mentioned in the video, its only executing first value provided once only

sibanidevi
Автор

Your Postman related tutorials are great. Related to this one I do not understand the advantage of the pre-request script instead of using data file when running a collection. Seems easier for me to create a csv/json file and select it in Collection Runer.

jpeca
Автор

HOw can I execute same api with diiferent files in a folder. Each file is selected in the upload field as binary data ?

rallysahil
Автор

Great video!

It helped me a lot to solve some massive integration problem with multiple customers.

Thanks!

VictorDabela
Автор

postman.setNextRequest("xyz") throwing BAD Request 400, please suggest

merajulhaque
Автор

Awesome. You saved my day, liked and subscribed your channel :)

meandherforeternity
Автор

Thank you very much!! this is exactly I am looking....getting after a lot of searches.

apekshapatel
Автор

is it possible to do the same without collection runnet, just scripts in postman ? to save multiple datasets from csv file?

AlessiaCaraFans
Автор

More Useful and thanks for covering the scenario which I am looking for, Much Appreciated

narekumar
Автор

Put the request name inside the setNextRequest surrounded by ' ' not " " ... it won't work otherwise

alextreme
Автор

How can I pass a whole object as variable instead of just passing it as a value in Key-Value pair?
What I mean is instead of passing "name": {{companies}} . can I pass only {{company_object}} where company_object = {"name": "Company Name"}..

dhavaljardosh
Автор

Hi Valentin, thanks for the tutorial. It was awesome. I guess what I would need some pointers on is how to write tests for each new NAME you are passing into theAPI requests. Something like: if the name is "Google", assert the response is 200, if the name is "Facebook", assert the response is 409. How can I loop through tests per request value?

ezekieludoh