Тёмный

Data-driven testing with different data sets for each request 

Valentin Despa
Подписаться 59 тыс.
Просмотров 16 тыс.
50% 1

In this tutorial, we will take a look at how to use different data sets for different requests when you are doing data-driven testing in Postman.
The Postman collection and the data-set are available here:
gist.github.com/vdespa/6680d4...
___
// 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 RU-vid channel:
vdespa.com/courses/
___
// I HAVE A QUESTION!
I do my best to answer all comments here on RU-vid but I cannot make any guarantees.
If you have a question, it is best to ask your question on the Postman User Group on Discord ( / discord .
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
/ discord
▸▸▸ JOIN the Postman User Group on Facebook
bit.ly/2OutAMZ
▸▸▸ 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
___
// IMPRINT
vdespa.com/imprint
---

Опубликовано:

 

14 апр 2021

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 41   
@vdespa
@vdespa 3 года назад
👉 Want to learn more about Postman? Check my complete Postman online course. vdespa.com/courses/?q=RU-vid
@vijayalakshminaik6050
@vijayalakshminaik6050 Год назад
Hi i am getting typeerror: Cannot read property 'filter'of undefined for pre requisite code can you please suggest
@sparknoid
@sparknoid 2 года назад
Loved your videos valentine with data driven testing heavily used in my company I was able to create collection and automate sanity suites for myself in testing .... It was amazing !!! Reduced manual effort tremendously. .looking forward to these kinds of more videos
@vdespa
@vdespa 2 года назад
Thanks for letting me know. Please email me at valentin@vdespa.com - I would love to hear more about your use-case.
@sparknoid
@sparknoid 2 года назад
@@vdespa what more concepts are there to master this tool ?
@aakashjain4437
@aakashjain4437 3 года назад
Please create a video based on the E2E testing flow with MySQL DB connection setup along with complex queries. Btw your all content are awesome.
@prateektomar4874
@prateektomar4874 Год назад
This video is really very interesting. Love from India :)
@vdespa
@vdespa Год назад
Glad you enjoyed it! You are welcome. Thank you for leaving a comment.
@pankajkukkar3849
@pankajkukkar3849 Год назад
Thank you Valentin for creating such informative video on Postman. It really helped me to resolve the issue i was facing. I have another requirement to generate html report along with junit or json report for the same run. could you please help me to generate all the possible reports for each runs performed from Postman instead of only html or only json report.
@mogliff3414
@mogliff3414 3 года назад
This is wonderful I wanted to hide pre- request logs from console is there anyway ?
@vibhorsharma2436
@vibhorsharma2436 3 года назад
Thanks @Valentin, it is awesome video, it helps lot. I have an query, let suppose i have two Post Request in the collection and i have created one .csv/.json file but for the first request i have 3 data set and for 2nd I have four data set. When i run the collection then at the four iteration first request fail because of no data, there is any way when runner is running that time first request should not be run for forth iteration.
@venkataammanabrolu3736
@venkataammanabrolu3736 2 года назад
Any update on this?
@Lucajeck
@Lucajeck 3 года назад
Hi, thank you very much for your videos, I have been an analyst tester for a short time and I have learned a lot thanks to you. I need a little advice. Is there any way or tool to compare the output of one set of APIs with the output of another set of APIs automatically? I would like to understand if the new APIs developed by the developers have the same output as the old ones with the same input. Thank you very much.
@vdespa
@vdespa 3 года назад
Thanks, Claudio! Have you seen this tutorial: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-9IgvFkKhJbk.html
@harishkce1989
@harishkce1989 Год назад
Hello Valentin - thanks for sharing the java script file - just a quick question for clarification - does the script stop logically if the imported file is not valid or no data found ? and sequential steps are not executed ? ex : you have if (requestdata.length==0 console.log) { console.log ("No data found"); return; }
@vitav2009
@vitav2009 2 месяца назад
hi where is the pre-request code form your video available?
@vdespa
@vdespa 2 месяца назад
Did you check the description? It contains a link to the collection.
@perrucheval
@perrucheval Год назад
Is there a way to modify this so that it is possible to start the data loop at a folder level instead? Ex: folder 'User' contains 2 folders containing each a flow of requests. 1 flow is not data-driven and 1 is. If executing manually from Postman, I would start the run of the datadriven folder adding the dataset at that level and not the request. I want to be able to start my full collection adding the dataset at the collection level but only have it applied for its designated folder. ps. the data file would contain different datasets for different folders too
@cht7162
@cht7162 2 года назад
Hi Valentin, is it possible to use a dynamic data from a website and then use it as a value of a variable?
@vdespa
@vdespa 2 года назад
Theoretically yes, but you need to parse the website to extract that value. So things could get ugly.
@shrutigoyal7666
@shrutigoyal7666 Год назад
Hey Valentin just loved your tutorial. Its super useful. But i need one help. am stuck at 1 place. the data set which i am sending to my request has different response status codes and not just 200 OK so i want to pass the code value as well from the file. SO this is how am giving the value in my json { "id1":"b36059d1-f323-4f6b-aaad-a5f863e94304", "id2":"bc", "status":"200" } , So now in my test i want to assert with this status code and am finding it difficult to read status value and compare for each data or iteration . Is this possible? I could do it with single request data file but with the above data file am finding it difficult
@vdespa
@vdespa Год назад
Thanks for your kind words. It is hard to answer this with the given information. Consider posting your question in the Postman community (community.postman.com/) and share what you have tried so far and where did you get stuck. Include screenshots and as many details as possible. Feel free to tag me with @vdespa. Thanks!
@arpitasuhagiya9629
@arpitasuhagiya9629 Год назад
Hiii valentin.. I'm getting "Can not reas properties of undefined (reading 'iterationData') " I have tried same pre-request script as your for my 2 post api and when i try to run collection getting this error. While i hve provided json file already.. Can you help me out... Thank you for this video..
@vdespa
@vdespa Год назад
It is hard to answer this with the given information. Consider posting your question in the Postman community (community.postman.com/) and share what you have tried so far and where did you get stuck. Include screenshots and as many details as possible. Feel free to tag me with @vdespa. Thanks!
@YoursKSMahesh
@YoursKSMahesh 2 года назад
Hi Valentin, great job, thank you. But there is a problem with your pre-request script. I'm driving the data from JSON where I'm asserting actual and expected. On doing so, I'm getting undefined for pm.variables.set(key, value). Until previous step, I'm able to fetch the data. Your guidance is appreciated in resolving this issues as its solves much effort. Thanks, Mahesh
@vdespa
@vdespa 2 года назад
You can't fetch data you set. Use get.
@YoursKSMahesh
@YoursKSMahesh Год назад
@@vdespa Thanks for the response. Let me check
@krishnakiranvajha3175
@krishnakiranvajha3175 3 года назад
Hi valentin ... I have a scenario : Request A should be executed only once and it’s o/p I have to use in request B ... And request B should be executed multiple times with different data from csv. Data I am loading from csv to request B. Req A o/p I saved in env variable and passed to req B . While running through runner how to limit req A to only one iteration ?? Pls help !!
@vdespa
@vdespa 3 года назад
Once you understand the main concepts around variables, some JavaScript and the content of this tutorial, it should not be difficult to implement your use-case.
@harutyunharutyunyan790
@harutyunharutyunyan790 2 года назад
Hi Valentin, great job, thank you. But there is a problem with your pre-request script. Before running collection when Iterations are set more than one, an error occures on a second iteration - "TypeError: Cannot convert undefined or null to object"
@vdespa
@vdespa 2 года назад
Does one iteration work?
@harutyunharutyunyan790
@harutyunharutyunyan790 2 года назад
@@vdespa yes
@vdespa
@vdespa 2 года назад
@@harutyunharutyunyan790 Well, why do you need two iterations?
@harutyunharutyunyan790
@harutyunharutyunyan790 2 года назад
@@vdespa I tried to do load test)
@vdespa
@vdespa 2 года назад
@@harutyunharutyunyan790 Postman is not a load testing tool. Check my channel, I did a video about this.
@rajashreekale3894
@rajashreekale3894 2 года назад
I have 6 requests in my collection and every request need different set of data and number of data sets for every request is different. I want to run 1st requests for 50 data sets and 2nd with 89 data sets(Iterations) and remaining requests only once. Can I achieve this using csv?
@venkataammanabrolu3736
@venkataammanabrolu3736 2 года назад
Any update on this?
@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.
@zafarTAG
@zafarTAG 2 года назад
How did you load data in Postman from that json file
@vdespa
@vdespa 2 года назад
You use the collection runner or newman.
Далее
Data-driven testing using Postman
13:37
Просмотров 58 тыс.
Loop request based on data from response in Postman
13:13
My Puzzle Robot is 200x Faster Than a Human
21:21
Просмотров 6 млн
skibidi toilet multiverse 039 (part 2)
08:58
Просмотров 4,1 млн
Data Driven testing using Postman JSON file
19:28
Просмотров 5 тыс.
How write API Tests with Postman in 3 easy steps
18:49
Просмотров 162 тыс.
Data-Driven Testing with Selenium Automation
13:05
Просмотров 1,5 тыс.
This Is Why Python Data Classes Are Awesome
22:19
Просмотров 795 тыс.
Run Postman Collections in Jenkins with Newman
35:35
Просмотров 20 тыс.
Simulating the Evolution of Rock, Paper, Scissors
15:00