How write API Tests with Postman in 3 easy steps

  Рет қаралды 163,259

Valentin Despa

Valentin Despa

Күн бұрын

Пікірлер: 115
@thomasfranz4826
@thomasfranz4826 6 жыл бұрын
Very smart guy, this is how it should be. He speaks normaly, you can learn something because his speech has beginning and end with idea inside. Thumbs up!
@geryvanegas1
@geryvanegas1 5 жыл бұрын
Your videos are a blessing, thank you VERY MUCH. I'm gonna be the first one to answer the challenge on the video: pm.expect(jsonData.headers["Cache-Control"]).to.eql("no-cache"); I had a hard time finding out why a dash was not accepted as a JSON variable, even that challenge was very instructive. thanks again.
@pogothemonkey7461
@pogothemonkey7461 5 жыл бұрын
Valentin, could you please comment on this? I would like to know where I can find the information/theory that explains what to do in this case, meaning, the logic behind putting the [square brackets] because without looking for the answer I would never have guessed my way past the error message (due to my parameter not being "accepted").
@amanpathania
@amanpathania 3 жыл бұрын
@@pogothemonkey7461 "Cache-Control" has a "-" and in order to pass cache control as a single value, you would have to use ["Cache-Control"]
@bolexi7902
@bolexi7902 2 жыл бұрын
Thank You for this one, I never needed to search elsewhere :)
@anna-iz5op
@anna-iz5op Жыл бұрын
It doesn't work for me. "headers" is faded and I get an answer: Your test name | AssertionError: expected undefined to deeply equal 'no-cache'.
@MaheshJoshi_wellington
@MaheshJoshi_wellington 6 жыл бұрын
You are the best API tutor I found on youtube hats of to you.. Keep it up
@MaheshJoshi_wellington
@MaheshJoshi_wellington 6 жыл бұрын
Valentin Despa your most welcome I am waiting for next 3 parts now ..:)
@williamstings
@williamstings 3 жыл бұрын
After going through countless stackoverflow threads this video taught me what i needed in a few minutes. Awesome content!
@StephanAshkenazy
@StephanAshkenazy 12 күн бұрын
An excellent tutorial as usual - thanks a lot Val!
@vdespa
@vdespa 11 күн бұрын
You are welcome. Thank you for leaving a comment.
@renemandiangu1890
@renemandiangu1890 6 жыл бұрын
Valentin, you are the best. You explain things the simplest way. Keep up the good work. Thanks.
@Gabe9408
@Gabe9408 6 жыл бұрын
let jsonData = pm.response.json(); pm.test("Check for JSON body", function () { pm.expect(jsonData.headers['Cache-Control']).to.eql("no-cache"); }); No need for the Postman course! I already purchased your Udemy video thanks !!
@joshuakincheloe
@joshuakincheloe 6 жыл бұрын
Bought your course as I am jumping into the world of headless CMS, and saw myself going WTH do I do now. You allowed me to understand what I was in for and I appreciate your work Valentin. Thank you!
@rahulmehta27
@rahulmehta27 4 жыл бұрын
Please subscribe my channel. I will be uploading all the api related topic part by part. kzbin.info/www/bejne/pHLIeZRnqLKeppI
@mikeroberts6203
@mikeroberts6203 5 жыл бұрын
Thanks!! That was very helpful. Had some requests built out in Postman and was curious about the testing side... this video made it easy to write my first few tests
@rahulmehta27
@rahulmehta27 4 жыл бұрын
Please subscribe my channel. I will be uploading all the api related topic part by part. kzbin.info/www/bejne/pHLIeZRnqLKeppI
@ardit9988
@ardit9988 3 жыл бұрын
🇬🇧🇬🇧🇽🇰🇽🇰🦋🦋💫
@vdespa
@vdespa 4 жыл бұрын
Download the FREE Postman Quick Reference Guide 👉 www.subscribepage.com/postman
@sameernaqvi1751
@sameernaqvi1751 6 жыл бұрын
The best video on API testing on youtube, your explanation is superb..
@celiadallel17
@celiadallel17 2 жыл бұрын
Thank you so much for all! You are THE BEST
@vdespa
@vdespa 2 жыл бұрын
Thanks, Celia!
@Julie_withoutRomeo
@Julie_withoutRomeo Жыл бұрын
Thanks for your videos Valentin, enjoying it from Nigeria . But can one push their API from postman to GitHub??
@mariiakit4830
@mariiakit4830 5 жыл бұрын
Valentin, thanks to you I've created the test to verify that boolean true returns!! I don't even know javascript!
@NehaKumari-hn4uk
@NehaKumari-hn4uk 2 жыл бұрын
What kind of test case we can design for student roll no ,name,class,age this was asked by one interviewer I didn't answered so can you tell
@vinayam4080
@vinayam4080 4 жыл бұрын
Very Good tutorial... Thank you for your efforts...
@vdespa
@vdespa 4 жыл бұрын
I am glad it helped. Thanks for letting me know.
@JennyAChannel
@JennyAChannel 2 жыл бұрын
What a great explanation!!
@vdespa
@vdespa 2 жыл бұрын
Glad you think so! You are welcome. Thank you for leaving a comment.
@anshikaagarwal9493
@anshikaagarwal9493 2 жыл бұрын
Hi! your videos are amazing. But have a request can u make a video on supertest
@vdespa
@vdespa 2 жыл бұрын
Thanks for your kind words. Are you looking for an introduction to supertest or what exactly?
@nadeem2sparkle2005
@nadeem2sparkle2005 6 жыл бұрын
Appreciate your patience and eagerness to share knowledge, well done.
@shikhaawasthi5333
@shikhaawasthi5333 4 жыл бұрын
Really helpful videos. You covered basics in crisp and simple way. Thanks.
@vdespa
@vdespa 4 жыл бұрын
You are welcome. Thanks for letting me know
@siddharthau489
@siddharthau489 2 жыл бұрын
Thanks for the detailed explanation. Can we write a pre request script to upload an image file 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.
@vdespa
@vdespa 2 жыл бұрын
You're welcome! You can't access the filesystem from scripts.
@Arqu07
@Arqu07 5 жыл бұрын
I haven't noticed any solution yet for the assignment so I am posting mine: pm.test("assignment", function () { pm.expect(jsonData.headers["Cache-Control"]).to.eql("no-cache"); });
@Arqu07
@Arqu07 5 жыл бұрын
@@vdespa Thank you, but anyway it's too late to receive a prize? :P
@yuwenpixon
@yuwenpixon 4 жыл бұрын
very clear tutorial. Thanks man!
@vdespa
@vdespa 4 жыл бұрын
You're welcome!
@isratnilu2791
@isratnilu2791 2 жыл бұрын
Thanks for this video.
@vdespa
@vdespa 2 жыл бұрын
You are welcome. Thank you for leaving a comment.
@isratnilu2791
@isratnilu2791 2 жыл бұрын
@@vdespa I like your tutorial. Easy to understand. Now I am working on postman. Your vedios made me make scenes. Thanks
@codelaravel
@codelaravel 2 жыл бұрын
Great work 👍
@vdespa
@vdespa 2 жыл бұрын
Thank you! Cheers!
@parulgrover8161
@parulgrover8161 3 жыл бұрын
Thank you for this vedio !! please let me know that is it necessary to learn javascript to write tests for POSTMAN, I am from Manual testing background, Please suggest.
@vdespa
@vdespa 3 жыл бұрын
It won't hurt if you know some basics around Javascript.
@parulgrover8161
@parulgrover8161 3 жыл бұрын
Will learn thank you for the reply:)
@mamdohlotfy3459
@mamdohlotfy3459 4 жыл бұрын
Link to download the quick reference is not working can you check please...thanks a lot
@vdespa
@vdespa 4 жыл бұрын
Thank you for letting me know. I have updated the link.
@venkateshramachandran2579
@venkateshramachandran2579 3 жыл бұрын
I watched this vide many times. thank you for the clear explanation....But I am trying to execute a test case for Response body value check. But in my API url instead of string i have a array of values ( (6) [{..}, {..}.....] ... How can I do this ?
@vdespa
@vdespa 3 жыл бұрын
You need to learn about arrays and objects in JavaScript.
@prashantkatti
@prashantkatti 5 жыл бұрын
Very well taught in the video. I am active member and follower of your course now.
@Mohamed-uf5jh
@Mohamed-uf5jh 5 жыл бұрын
Great Job Valentin ,I am discovering Postman , it not just an test api ,It's more wow
@eliasshikhalshabab805
@eliasshikhalshabab805 5 жыл бұрын
That's really an awesome tutorial to explain how to write a simple test on Postman. Thanks alot
@rahulmehta27
@rahulmehta27 4 жыл бұрын
Please subscribe my channel. I will be uploading all the api related topic part by part. kzbin.info/www/bejne/pHLIeZRnqLKeppI
@lizalinnayak1029
@lizalinnayak1029 4 жыл бұрын
Thank you so much ... Really helped me a lot...
@vdespa
@vdespa 4 жыл бұрын
I am glad to hear that, thank you!
@harishshet7268
@harishshet7268 4 жыл бұрын
Hey Thanks for the video, I am stuck here I want to execute redis lpush via postman, means I want to directly push some contents into redis db, Can you tell me how we can connect to REDIS DB via postman and do the lpush? Thanks
@vdespa
@vdespa 4 жыл бұрын
Hi. Did you check if your Redis installation has a REST API?
@nageshkp4768
@nageshkp4768 4 жыл бұрын
Hello Valentin, I have a response from postman in binary format and the content type is application/x-protobuf. How can I convert the binary format to json? Below is the format and is of about 150-200 lines. �ʠ ������" Current-Roughness" Long-term-Roughness* ��&�\�>���>ޛ=@* �ԍ���>1
@vdespa
@vdespa 4 жыл бұрын
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.
@mayurshankar3181
@mayurshankar3181 4 жыл бұрын
wowowowowowowowoowow Valentinnnnnnnnnn Genuius Man!
@vdespa
@vdespa 4 жыл бұрын
Thanks!
@syedhashim82
@syedhashim82 4 жыл бұрын
AssertionError: expected undefined to deeply equal 'no-cache' The response does not include Cache-Control header. @Valentin Despa please help me out.
@vdespa
@vdespa 4 жыл бұрын
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.
@harmeets375
@harmeets375 4 жыл бұрын
Great Learning...
@vdespa
@vdespa 4 жыл бұрын
Thank you very much!
@Richa801
@Richa801 6 жыл бұрын
Thank you for the awesome video.. making learning easy
@DebashishP82
@DebashishP82 6 жыл бұрын
Excellent article mate. Really love you explain things. Cheers. One more thing I am trying to write the code to count the number of arrays in a response. can you please guide me on this if there is any link to refer. Regards Deb
@nithyaraji7694
@nithyaraji7694 5 жыл бұрын
Tutorial is very much helpful. But in my case the property name is "0" in place of "args:" in your video, but am not allowed to enter ".0" in my tests like "jsondata.0", could you please tell me how to resolve this?
@nithyaraji7694
@nithyaraji7694 5 жыл бұрын
@@vdespa , Yes it worked.. Thank you so much..!!
@Zahira85Zen
@Zahira85Zen 4 жыл бұрын
and What if the object inside your json file is having any dots? for example let's suppose your file is having "is.Good" instead of "isGood"? I saw postman is giving me an error
@vdespa
@vdespa 4 жыл бұрын
Try something like someObject['is.Good'] Does this help?
@Zahira85Zen
@Zahira85Zen 4 жыл бұрын
Valentin Despa yes!!!
@randy7425
@randy7425 4 жыл бұрын
do you have to use JavaScript for your test or can you use other languages?
@vdespa
@vdespa 4 жыл бұрын
Great question. With Postman you can only use JavaScript.
@randy7425
@randy7425 4 жыл бұрын
@@vdespa Are there other API testing tools/platforms that you know of that do not use JavaScript? I myself, am use to using python for automation tests, and would rather not have to learn a new language...thoughts?
@vdespa
@vdespa 4 жыл бұрын
@@randy7425 have you tried using pytest?
@randy7425
@randy7425 4 жыл бұрын
@@vdespa I have not. I can't find any documentation that says Postman can use pytest
@vdespa
@vdespa 4 жыл бұрын
If you don't want to learn JavaScript, forget about Postman. You need to use another tool. Writing API tests in Postman is rather easy. You can learn really fast.
@Yashwanthprasad
@Yashwanthprasad 4 жыл бұрын
How check whether data is pushing to database using postman...?
@vdespa
@vdespa 4 жыл бұрын
I think this will help kzbin.info/www/bejne/Z16cYpxtZZpmedU
@janetgardner1105
@janetgardner1105 6 жыл бұрын
Great Job
@LFF___
@LFF___ 4 жыл бұрын
for anyone wondering for solution: let jsonData = pm.response.json(); pm.test("Your test name", function () { pm.expect(jsonData.headers.Cache-Control).to.eql('no-cache'); }];
@vdespa
@vdespa 4 жыл бұрын
Thanks for sharing but I doubt this will work.
@ON-zd3vf
@ON-zd3vf 5 жыл бұрын
This was excellent. Thanks!
@joylanjainckmesina4834
@joylanjainckmesina4834 3 жыл бұрын
I tried it on my end but I used "Host" instead. pm.test("HOST is httpbin.org", function () { var jsonData = pm.response.json(); pm.expect(jsonData.headers.Host).to.eql('httpbin.org'); });
@vdespa
@vdespa 3 жыл бұрын
Looks good.
@nadeem2sparkle2005
@nadeem2sparkle2005 6 жыл бұрын
This is how I think: let jsonData = pm.response.json() pm.test("Header Test", function(){ pm.expect(jsonData.headers.Cache-Control).to.eql('no-cache'); });
@marcussmith2006
@marcussmith2006 6 жыл бұрын
@Valentin Despa Great video - as for the contest - please see my working answer ! pm.test("Test Header Cache-Control value for Valentin's competition", function () { pm.expect(pm.request.headers.get('Cache-Control')).to.eql('no-cache'); });
@marcussmith2006
@marcussmith2006 6 жыл бұрын
@@vdespa thanks Valentine - love your videos - as I've answer the competition correctly do i still win a copy of your course?
@aartirathee6390
@aartirathee6390 4 жыл бұрын
Solution:- pm.test("your test name", function(){ pm.expect(jsonData.headers.Cache-Control).to.eql('no-cache');})
@vdespa
@vdespa 4 жыл бұрын
Are you sure that this won't cause any errors, Aarti?
@isamorita8647
@isamorita8647 5 жыл бұрын
Thank u!! great tutorial
@rodybothe3329
@rodybothe3329 6 жыл бұрын
Good explanation :)
@silverpizza8812
@silverpizza8812 5 жыл бұрын
Great video, thanks! Anyone know why when I try to print like this is doesn't work--> console.log(jsonData.headers.Cache-Control); ...but this one does? --> console.log(jsonData.headers['Cache-Control']);
@silverpizza8812
@silverpizza8812 5 жыл бұрын
@@vdespa Hey, thanks for the reply! Really enjoying your videos. I'm interested in your course but not sure it will cover what I need to do: I need to automate comparing the responses of 2 APIs, ie same service in different environments. Do you cover anything like that? Either way, thanks a lot for your help!
@silverpizza8812
@silverpizza8812 5 жыл бұрын
@@vdespa Ok. I guess a better question is--do you think there's any obvious reason I wouldn't be able to do that? I think it should work & think I almost have it... anyway, is there a way for me to donate or should I just buy your class to give you something back? You've already helped me a lot & I appreciate it--thank you sir.
@RakeshBitling
@RakeshBitling 4 жыл бұрын
Nice video link is paid..pls share free url ..loved your explanation
@vdespa
@vdespa 4 жыл бұрын
Place subscribe to the KZbin channel for more free tutorials.
@emiliozelarayan2306
@emiliozelarayan2306 2 жыл бұрын
Nice
@vdespa
@vdespa 2 жыл бұрын
Great! Thank you.
@bibilebaby
@bibilebaby 4 жыл бұрын
The ending made me nervous,,,,Good explanation tho,thanks a lot
@vdespa
@vdespa 4 жыл бұрын
😂 thanks for watching. I am glad it was useful.
@Daidera91
@Daidera91 5 жыл бұрын
I like postman but still don't see the value in the javascript testing. If i e.g. write my api in Golan, why shouldn't i test it using Golang native testing libraries like Ginkgo? When i gave the postman testing i try i stumbled upon very basic scenarios where the testing from the app is not working for me. Imagine testing an endpoint that creates a user. If i fill in my test with a demo user name and run it twice, the API will respond the second time with an error code because this user is already existing. I am not able to run a setup or teardown functions that actually cleanups my test database for every unit test.
@abdelrahmanatef2325
@abdelrahmanatef2325 5 жыл бұрын
Keep it up its great tutorial
@zxcvmjg
@zxcvmjg 5 жыл бұрын
Nice tutorial!!
@hollyshmit9956
@hollyshmit9956 5 жыл бұрын
Kay....so, imma loving tis IP And waz thinkin' bout doin BCA bla blah(I need to research some more aye!?) Imma kinda lost.... I wanna Ave a job which ain't no consist of deep mathematics or tooooo much theory..... I love computers(I sound like... 5?). Yeah so uh, suggest me wtf do I do bro/dude/sis/stranger anyone out there with experience!!! ... Oh nd imma in 12th in commerce(consist of economics, accounts, business studies, informatics practices, english)... Let me rephrase the 2nd para or was it 3rd above? I wanna Ave Profesional degree first and a damn well respectable, lil fun, good pay job in future...
@ardit9988
@ardit9988 3 жыл бұрын
😃
@MK-ms6um
@MK-ms6um 3 жыл бұрын
I am appreciating all the effort but it is impossible to listen your videos. The champ noises you make before every sentence are unbearable to listen to.
@vdespa
@vdespa 3 жыл бұрын
I am sorry about that. I am working to remove them in the latest videos.
@MK-ms6um
@MK-ms6um 3 жыл бұрын
@@vdespa It is extra work and effort that you will make only for us! Thank you for that!
@vdespa
@vdespa 3 жыл бұрын
I am happy to help 😊 unfortunately existing KZbin videos can't be 'repaired'. Stay tuned as I am pushing more content.
How write API Tests with Postman in 3 easy steps (PART 2/3)
15:59
Valentin Despa
Рет қаралды 30 М.
ПРЯМОЙ ЭФИР. Золотой мяч France Football 2024
4:41:06
龟兔赛跑:好可爱的小乌龟#short #angel #clown
01:00
Super Beauty team
Рет қаралды 117 МЛН
World’s strongest WOMAN vs regular GIRLS
00:56
A4
Рет қаралды 14 МЛН
When mom gets home, but you're in rollerblades.
00:40
Daniel LaBelle
Рет қаралды 127 МЛН
Learn JavaScript for Postman API testing - Full Course for Beginners
1:28:39
REST API & RESTful Web Services Explained | Web Services Tutorial
15:33
How write API Tests with Postman in 3 easy steps (PART 3/3)
9:10
Valentin Despa
Рет қаралды 14 М.
How to Use Postman for Beginners ? | Super Easy !
21:13
Saumya Nayak
Рет қаралды 40 М.
How to write API test cases in Postman using JavaScript
15:45
Naveen AutomationLabs
Рет қаралды 89 М.
API & WebServices Testing Interview Questions & Answers - Part 1
42:31
Naveen AutomationLabs
Рет қаралды 203 М.
Session1: Introduction to API Testing
1:28:06
SDET- QA
Рет қаралды 1 МЛН
Redis Crash Course
27:31
Web Dev Simplified
Рет қаралды 638 М.
ПРЯМОЙ ЭФИР. Золотой мяч France Football 2024
4:41:06