Postman API Test Automation for Beginners

  Рет қаралды 147,923

freeCodeCamp.org

freeCodeCamp.org

Күн бұрын

Learn how to use Postman to write and automate API tests.
🎥 Course created by @vdespa
Proudly sponored by www.youtube.com/@postman?sub_...
📚 Course Notes: github.com/vdespa/automation-...
📺 Valentin on KZbin: www.youtube.com/@vdespa?sub_c...
🔗 Valentin's website: www.vdespa.com
🐦 Valentin on Twitter: / vdespa
🤵 Valentin on LinkedIn: / vdespa
⭐️ Course Contents ⭐️
⭐️ Unit 1 - Introduction to API testing
0:00:00 Lesson 1 - Welcome
0:03:50 Lesson 2 - Introduction to the project
0:10:27 Lesson 3 - What is API testing
0:12:08 Lesson 4 - Manually testing the API
0:20:49 Lesson 5 - Using Postman variables to store secrets
0:30:47 Lesson 6 - Writing scripts in Postman
0:36:14 Lesson 7 - Use the Postman console for debugging scripts
0:39:47 Lesson 8 - Writing an API test
0:44:39 Lesson 9 - JavaScript basics
0:45:46 Lesson 10 - JavaScript basics - Variables
0:58:52 Lesson 11 - JavaScript basics - Variable scopes
1:04:54 Lesson 12 - JavaScript basics - Data types
1:22:44 Lesson 13 - JavaScript basics - Functions
1:33:15 Lesson 14 - JavaScript basics - Methods
1:38:54 Lesson 15 - JavaScript basics - Callback functions
1:48:15 Lesson 16 - JSON format
1:52:09 Lesson 17 - Accessing data from the response body
1:58:29 Lesson 18 - Passing data from one request to the other
2:04:23 Lesson 19 - Setting Postman variables from scripts
2:09:57 Lesson 20 - Assignment #1
⭐️ Unit 2 - Writing API tests
2:16:24 Lesson 1 - Unit overview
2:18:03 Lesson 2 - Test structure in Postman
2:22:51 Lesson 3 - Making assertions about the status code
2:25:15 Lesson 4 - Assignment #2
2:26:07 Lesson 5 - Asserting the response body is JSON
2:30:13 Lesson 6 - Writing simple assertions against the response body
2:38:17 Lesson 7 - Asserting the data-type of a property
2:46:13 Lesson 8 - Using Postman random variables in assertions
2:51:39 Lesson 9 - Regular expressions in tests
2:55:16 Lesson 10 - Assignment #3
2:56:01 Lesson 11 - JSON schema validations
3:01:27 Lesson 12 - Using Postman mock servers
3:12:23 Lesson 13 - Advanced JSON schema validation
3:18:08 Lesson 14 - Common pitfalls with JSON schema validation
3:20:24 Lesson 15 - Assignment #4
3:21:00 Lesson 16 - Testing response headers
⭐️ Unit 3 - Automation first steps
3:23:27 Lesson 1 - Unit overview
3:24:26 Lesson 2 - Collection runner
3:30:53 Lesson 3 - Scheduled runs
3:39:58 Lesson 4 - Postman CLI
3:43:40 Lesson 5 - Running a collection using Postman CLI
3:49:40 Lesson 6 - Postman CLI options
⭐️ Unit 4 - Integrating Postman tests in CI/CD
3:52:23 Lesson 1 - Unit overview
3:53:55 Lesson 2 - What is CI/CD?
3:55:51 Lesson 3 - CI/CD providers
3:57:51 Lesson 4 - Running Postman tests with GitHub Actions
4:05:10 Lesson 5 - Assignment #5
4:05:53 Lesson 6 - Running Postman tests in other CI/CD tools
4:07:42 Lesson 7 - Collaboration within a Postman workspace
4:13:22 Lesson 8 - Claim your badge
4:13:58 Lesson 9 - Conclusion

Пікірлер: 120
@vdespa
@vdespa 10 ай бұрын
Thanks for watching and I appreciate all your kind comments. Subscribe to my channel for more amazing content: www.youtube.com/@vdespa?sub_confirmation=1
@zwartepeat3552
@zwartepeat3552 8 ай бұрын
This course is a delight! I find that your tone of voice and the rythme at which you speak are perfect and very pedagogical! Everything is made crystal clear for us. Good job!
@vdespa
@vdespa 8 ай бұрын
@@zwartepeat3552 Glad to hear that. Thank you for your kind comment.
@zwartepeat3552
@zwartepeat3552 8 ай бұрын
@@vdespa Got a job interview this week on this topic! If I get this this is entirely thanks to you so I will notify you here for sure! Keep on going with the good stuff.
@babalolaolalekan1171
@babalolaolalekan1171 10 күн бұрын
@vdespa so basically API testing is used for both Manual et Automation
@muhammadhimdaadh2302
@muhammadhimdaadh2302 6 сағат бұрын
I have done everything only confused part is, in 5th assignment I cannot understand to which collection I should push to github? Because there are 5 collections right? To which collection I should push these?
@victorydaydeepstate
@victorydaydeepstate 10 ай бұрын
I'm a boomer and have no idea what you are talking about...but I'm excited
@heyyounotyouyou3761
@heyyounotyouyou3761 10 ай бұрын
Hey boomer, I'm a cppnfs and i know a little about what he's talking about... I'm excited too
@sheriffcrandy
@sheriffcrandy 10 ай бұрын
Don't call yourself a boomer man
@ekaterinekantaria8067
@ekaterinekantaria8067 9 ай бұрын
Thank you very much for this course! I'm glad I started to learn API automation with your training. Previously I knew just few things about test tabs, test snippents in postman and "run collection". Good luck in your future projects! 🙏
@niko1ndex
@niko1ndex Ай бұрын
this is BY FAR the best Postman API Test guide I've seen yet, very good entry level guide and everything is well explaiend and clear enough for anyone to understand
@jerome5969
@jerome5969 10 ай бұрын
Amazing tutorial for Postman covering the automation topics. Thank you so much!
@vdespa
@vdespa 10 ай бұрын
You bet, thanks for watching!
@rishikantsahu7364
@rishikantsahu7364 10 ай бұрын
Been waiting for something like this, thank you!
@volodymyrkopchuk1959
@volodymyrkopchuk1959 10 ай бұрын
Thank you very much for such quality free content. Thanks to you, I gained wonderful new knowledge and managed to look at Postman from a new perspective.
@vdespa
@vdespa 10 ай бұрын
You're welcome!
@royalapples9707
@royalapples9707 10 ай бұрын
I have been waiting for something like this for so long.
@Acksakal
@Acksakal Ай бұрын
The tutor is majestic, thank you!
@antoniorodriguez9028
@antoniorodriguez9028 28 күн бұрын
Excellent material. Recommend watching from start to finish.
@angelaasatryan4081
@angelaasatryan4081 19 күн бұрын
Excellent course, thanks Valentin! Highly recommended to everyone who wants to dive into the amazing world of API testing :)
@angelamayorgahurtado9370
@angelamayorgahurtado9370 9 ай бұрын
Thank you! It is an excellent course, I learnt a lot, I am trying to apply it to improve my testing and my knowledge. ;-)
@havefun5519
@havefun5519 10 ай бұрын
Thanks for the tut. 2:09:40 I really need this, everytime I log in, I need to copy and paste my token or something to another endpoint. now after login or doing some requests, I could set the variable. that is really convenient.
@vdespa
@vdespa 10 ай бұрын
Glad to hear you are improving your workflow. Thanks for your comment.
@abhijeetdhumal7385
@abhijeetdhumal7385 10 ай бұрын
This one is good We want Jmeter or Jmeter DSL PERFORMANCE TESTING also
@bossysmaxx3327
@bossysmaxx3327 10 ай бұрын
really helped me a lot man, its awesome and most of all its usefull, made my daily job so much easy
@vdespa
@vdespa 10 ай бұрын
Glad to hear that, thanks for your comment!
@bereketeldesilasie
@bereketeldesilasie 7 ай бұрын
That is an amazing course, Thanks!
@easylearnplatform8967
@easylearnplatform8967 10 ай бұрын
Great video, I have personally learnt a lot, continue bro
@vdespa
@vdespa 10 ай бұрын
Great 👍
@KaletaKLT
@KaletaKLT 7 ай бұрын
Incredible work done, Valentin! It was so easy to get through all of this. Huuuuge thanks!
@GeniDubovik
@GeniDubovik 8 ай бұрын
Thanks for such a great course. I just wanted to point to some sort of flaky dealing in "Assignment 3 - Task 2" - The value of the "id" property matches the regular expression pattern: ^[A-Z0-9]{9}$. It seems that sometimes the "id" value could be with the hyphens like this (O0X_M9S8B) and this regexp won't match thus making a test fail. Maybe it would be great to adjust regexp for the future wanderers
@vdespa
@vdespa 8 ай бұрын
Nice catch. That's on purpose. The API has a bug that appears only from time to time.
@aymanmalhattami
@aymanmalhattami 4 ай бұрын
Awesome tutorial, thanks
@TariqAhmad-hw7up
@TariqAhmad-hw7up 10 ай бұрын
Too good explanation of callback function
@vdespa
@vdespa 10 ай бұрын
Glad to hear, thanks!
@abhijeetdhumal7385
@abhijeetdhumal7385 5 ай бұрын
Please make video on Performance Testing using jmeter
@emcee19.05
@emcee19.05 7 ай бұрын
@vdespa In Unit 1, Lesson 5, if I change the variable name from x-api-key to anything else, why does it return a 401? It still uses the api_key variable from the collection. Thanks!
@grotsunfull
@grotsunfull 10 ай бұрын
great job!
@7vikgoku
@7vikgoku 6 ай бұрын
Thankyou so much for the video it was helpful
@polisvlogs2471
@polisvlogs2471 10 ай бұрын
Good job 👍
@DinaMicskei
@DinaMicskei Ай бұрын
Hello! Are the assignments no longer available? they are missing from the main fork
@abhishekkkr245
@abhishekkkr245 20 күн бұрын
Hey lady, Any other more sources to learn this tutorial?
@user-uz7cr4fg6l
@user-uz7cr4fg6l 10 ай бұрын
Amazing video!
@vdespa
@vdespa 10 ай бұрын
Thanks!
@weller781
@weller781 10 ай бұрын
Very good
@rishiraj2548
@rishiraj2548 10 ай бұрын
Great thanks
@samsonuteh3186
@samsonuteh3186 10 ай бұрын
Thank you very much Valentine for this course. For just one api, I can perform multiple tests. For example, to check if each of the parameters are required, I can make each field empty to see if it will produce a 400 status code error. I can also perform additional manual test on just one api. So in total for one api, I can have like 6 manual tests. Can you please explain how I can automate it so that I won't have to repeat the process.
@vdespa
@vdespa 10 ай бұрын
You can automate this by writing tests, instead of doing them manually.
@samsonuteh3186
@samsonuteh3186 10 ай бұрын
@@vdespa Can you do a video on this?
@vdespa
@vdespa 10 ай бұрын
@@samsonuteh3186 Yes, this is it!
@vladrileynavilys
@vladrileynavilys 8 ай бұрын
Is the price now missing for each product? I dont see it in the response body right now. (Im at 2:34:08 "writing simple assertions against the response body")
@ptantikul
@ptantikul 10 ай бұрын
Thanks!
@vdespa
@vdespa 10 ай бұрын
Thanks for your support!
@igorfurlan1333
@igorfurlan1333 9 ай бұрын
Hey Valentino. Thank you for the amazing content. I got stuck on the assigment 1 due to the authentication. I don't understand why all requests don't need Autorization, but when I get to "Create a new order" I need to get the authorization from the parent "Order" (x-api-key). Seems that it is using 2 times the same key, but with different names, what makes it very confusing to me. Could you give me some tip, please? Thanks
@vdespa
@vdespa 9 ай бұрын
Typically when you are reading public data you don't need auth. But when you create new data, you do. For example, on Amazon you can browse the products without being logged in. But to place an order, you need to log in.
@juanpabloquinteromartinez8737
@juanpabloquinteromartinez8737 8 ай бұрын
Thanks
@zaursamedov8906
@zaursamedov8906 10 ай бұрын
Please make a course about llm langchain huggingface vector database
@pavithransuresh6773
@pavithransuresh6773 10 ай бұрын
Please post ready api automation tutorial😊
@MdShadmanSaeed
@MdShadmanSaeed 24 күн бұрын
very nice
@GLR174
@GLR174 9 ай бұрын
Thank you for the course! Could you please use light theme next time?
@wardsuleiman1640
@wardsuleiman1640 4 ай бұрын
@vdespa, I'm unsure if this is the appropriate place for my question. If not, could you direct me to relevant resources? I have a legacy collection for a mobile application that requires test creation. The task involves testing the business logic through API testing, simulating the user journey by making API calls in a specific order, and ensuring the expected outcomes. However, as I dive deeper, the test script's code is becoming large and complex. My questions: Is API testing a suitable method for testing business logic where the order of the request matters and the requests are dependent on each othe? Is it acceptable to have large and complex code in test scripts, in other word whtat is a large and a complex test in API testing world? Could you recommend more advanced resources for such scenarios? Thank you.
@ELMlKO
@ELMlKO 10 ай бұрын
please do a shopify liquid course
@user-fr3fy6dm4w
@user-fr3fy6dm4w 7 ай бұрын
Hi valentin im getting stuck at assessment-create a new order api-its throwing bad request ...im doing the same steps as mentioned in the videos...plz let us know how to solve it....same issue is happening throughout the next set of assessments
@user-ei5ur4fy1v
@user-ei5ur4fy1v 10 ай бұрын
Hello, I'm not sure why i got a fail in verify work request of assignment 4 that log "Product id is correct | AssertionError : expected undefined to deeply equal 1002", Can you help me for this?
@user-ei5ur4fy1v
@user-ei5ur4fy1v 10 ай бұрын
but i already comment some my code and all of them pass haha ( im so curious!! )
@rams2354
@rams2354 5 ай бұрын
@vdespa I'm getting errors in Assignment 2, if I run individually it's getting passed but if I run from verify your work getting failed for almost 8 calls getting the below error, can you please help status > Get API status: contains status code test | AssertionError: expected undefined to be an object FAIL products > Get all products: contains status code test | AssertionError: expected undefined to be an object FAIL products > Get single product: contains status code test | AssertionError: expected undefined to be an object FAIL clients > Register a new client: contains status code test | AssertionError: expected undefined to be an object
@honor9lite1337
@honor9lite1337 10 ай бұрын
Up😊
@oskarwocz81
@oskarwocz81 10 ай бұрын
I got no response about the badge, i submited the form 3 weeks ago, anyone got theirs?
@jumbo999614
@jumbo999614 10 ай бұрын
What is the difference between pm.collectionvariable and pm.variable?
@mubarakabdulrazaq9241
@mubarakabdulrazaq9241 4 ай бұрын
collectionvariable sets the variable to a collection scope, while variable just sets a variable within that code block
@suvechhabhadra6120
@suvechhabhadra6120 9 ай бұрын
Hi Valentin, I have getting Status 401 and error message saying : Missing API key" though I have generate API key from my profile and assign it to the postman_api_key under the Assignment 1 collection. What I am doing wrong .? Please suggest
@adithyaaradhya9360
@adithyaaradhya9360 9 ай бұрын
@suvechhabhadra6120 you need to add x-api-key in Assignment API request and add {{apiKey}} and add to header, hope this helps
@avaneeshshambhat5950
@avaneeshshambhat5950 7 ай бұрын
@@adithyaaradhya9360 Hey there. Can you please explain a bit more. Even I am stuck in the same issue
@Slaughterhaus988
@Slaughterhaus988 9 ай бұрын
I don't have option 'Automate runs via CLI' in postman Runner tab, what went wrong?
@vdespa
@vdespa 8 ай бұрын
Make sure you are in a private repo. Sometimes a public repo will hide this option (not sure why).
@hagerallam2193
@hagerallam2193 2 ай бұрын
Hello, I tried to create a Fork for 1st assignment, but I couldn't select the workspace mentioned in the Video. I can only Select My Workspace, which doesn't have the API required to continue the assignment.
@antondonetckij8259
@antondonetckij8259 2 ай бұрын
Hello! If you followed step-by step through the video you should be able to select the workspace that was created by you earlier. Try to reproduce all steps one more time. And yes, your workspace can have the different name then author has.
@shrutilenka1857
@shrutilenka1857 9 ай бұрын
Create a new Order post api is showing an error "Missing API key", i first get requestion from ''REGISTER A NEW CLIENT" then the forked workspace the "create new order " is running error free,but when i duplicate and run it it is showing the same error in assignment workspace. What to do ?
@mRxmodule
@mRxmodule 4 ай бұрын
you can simply put in the Assigment - Create new order header the x-api-key : API KEY
@magdalenatakeva9005
@magdalenatakeva9005 2 ай бұрын
For some reason I cannot get my Badge although everything is working OK and I have done all my assignments. I would appreciate a little help on this
@seththunder2077
@seththunder2077 4 күн бұрын
Can somoene tell mei if this will work for python as well cuz he mentioned for JS at the very beginning
@kyawzawhtet5623
@kyawzawhtet5623 10 ай бұрын
Please Flutter REST API Tutorial
@nikhilpatil9904
@nikhilpatil9904 Ай бұрын
Hi please share question set for api testing
@shrutiwavdankar2189
@shrutiwavdankar2189 2 ай бұрын
Can I please get the valid api key to run the Create a New Order api
@reshma1375
@reshma1375 10 ай бұрын
@barbararodrigues4273
@barbararodrigues4273 6 ай бұрын
Hello @vdespa I claimed my badge few days ago but until today I had no answer, can you help me?
@ageorbentaylor53
@ageorbentaylor53 10 ай бұрын
Where is up?
@aktar749
@aktar749 7 ай бұрын
I see some people having trouble when Create a new order which is part of first assignment . Error is " Missing API key" Status: 402 Unauthorized. anyone has an answer to that or Mr valentine will honor us with an answer or explanation? Thank you.
@mRxmodule
@mRxmodule 4 ай бұрын
Hi, I fixed by first create a new token(API key) with the POST Register a new client, than paste it to the Assigment#1 - POST Create a new order HEADERS like Key=x-api-key and the value is the newly generated API key.
@shrutiwavdankar2189
@shrutiwavdankar2189 2 ай бұрын
Can some one please share the valid api key for the collection mentioned in the video
@subeeradam098
@subeeradam098 10 ай бұрын
Pls only 1k plsssss
@ayushpratap8301
@ayushpratap8301 10 ай бұрын
Course on "Trading for beginners" please Sir
@akghosh
@akghosh 10 ай бұрын
hope this code reduces my 404 error 😢
@user-yd5wd6bn5l
@user-yd5wd6bn5l 10 ай бұрын
Hi! ✅ Assignment #2 Why am I getting this error status > Get API status: contains status code test | AssertionError: expected undefined to be an object Here is my script It looks good pm.test("status code is 200", function () { pm.expect(pm.response.code).to.eql(200); });
@vdespa
@vdespa 10 ай бұрын
Can you share a link to your workspace? Thanks!
@hm-shofiqurrahman1612
@hm-shofiqurrahman1612 6 ай бұрын
@@vdespa getting same problem. how to solve please
@idalbertoricardocruz6322
@idalbertoricardocruz6322 3 ай бұрын
@@vdespa getting the same issue, what I need to do? TIA
@degerdi
@degerdi 10 ай бұрын
Oh hey this is what I do for a living lol
@idalbertoricardocruz6322
@idalbertoricardocruz6322 3 ай бұрын
Min 2:02:13, when I try to create a new order, I get "error": "Invalid API key"
@bartoszpietrzyk7319
@bartoszpietrzyk7319 3 ай бұрын
I'm facing exact same issue, do you managed to overcome it?
@vdespa
@vdespa 3 ай бұрын
Try to provide a valid API key.
@sandroamiridze6619
@sandroamiridze6619 10 ай бұрын
There was 999 likes and i became a hero!!!!!!
@AB-bu8ti
@AB-bu8ti 4 ай бұрын
Assignment 2 instructions are missing or unclear/unhelpful.
@MoheyGames
@MoheyGames 10 ай бұрын
First 🎉
@MincrfatTutorials
@MincrfatTutorials 10 ай бұрын
congrats on 8ml
@user-li9ds1gp6v
@user-li9ds1gp6v 4 ай бұрын
What knowledge do i need to possess before watching the video
@abenjamin13
@abenjamin13 10 ай бұрын
OMG 🫵 Fantastic thank you 🙏 I have been needing to dive deeper into Postman
@vdespa
@vdespa 10 ай бұрын
You're welcome, thanks for your comment. Enjoy the course.
@annietran8200
@annietran8200 10 ай бұрын
@vdespa
@vdespa 10 ай бұрын
Thanks!
@adithyaaradhya9360
@adithyaaradhya9360 9 ай бұрын
@vdespa I'm getting errors in Assignment 2, if I run individually it's getting passed but if I run from verify your work getting failed for almost 8 calls getting the below error, can you please help status > Get API status: contains status code test | AssertionError: expected undefined to be an object FAIL products > Get all products: contains status code test | AssertionError: expected undefined to be an object FAIL products > Get single product: contains status code test | AssertionError: expected undefined to be an object FAIL clients > Register a new client: contains status code test | AssertionError: expected undefined to be an object
@cristiolteanu2831
@cristiolteanu2831 9 ай бұрын
You have to put the requests in subfolders, and all tests will pass.
@rams2354
@rams2354 5 ай бұрын
I"m also getting the same problem,plz help me
@ralitsamladenova
@ralitsamladenova 4 ай бұрын
@@cristiolteanu2831 yep this does the trick, thank you! I encountered the same issue - so as far as I understand on each assignment (I am on the second currently) you first perform the tasks in the initial collection (which is Valentino Artisan Coffee Shop); For the second Assignment after you complete the tasks (which are adding the status code 200 assertions to all requests) you then duplicate NOT every single request, BUT the whole folder including the requests - meaning you duplicate status, products, clients and orders folders - to Assignment 2 -> API requests folder. Don't forget to rename them to have the same names. Hope this helps. This is not very clearly underlined in the assignment description and can be easily omitted.
@ralitsamladenova
@ralitsamladenova 4 ай бұрын
@@rams2354 check the response above if you still have issues :)
Postman Beginner's Course - API Testing
2:09:38
freeCodeCamp.org
Рет қаралды 2,3 МЛН
What is a REST API?
9:12
IBM Technology
Рет қаралды 1,4 МЛН
Dynamic #gadgets for math genius! #maths
00:29
FLIP FLOP Hacks
Рет қаралды 19 МЛН
ПООСТЕРЕГИСЬ🙊🙊🙊
00:39
Chapitosiki
Рет қаралды 16 МЛН
어른의 힘으로만 할 수 있는 버블티 마시는법
00:15
진영민yeongmin
Рет қаралды 12 МЛН
$10,000 Every Day You Survive In The Wilderness
26:44
MrBeast
Рет қаралды 71 МЛН
What is Postman and why everyone use it ?
28:33
Hitesh Choudhary
Рет қаралды 18 М.
Create a Sidescroller 2.5d Series Part 1
16:40
Brianko Games
Рет қаралды 8 М.
What is an API (in 5 minutes)
4:56
Aaron Jack
Рет қаралды 554 М.
5 Amazing Ways to Automate Your Life using Python
18:40
Internet Made Coder
Рет қаралды 190 М.
Learn TypeScript Generics In 13 Minutes
12:52
Web Dev Simplified
Рет қаралды 211 М.
Postman Api Testing Tutorial for beginners
16:45
Codemify
Рет қаралды 14 М.
Postman Tutorial #23 - Automating First API Test with Postman
11:41
Software Testing Mentor
Рет қаралды 11 М.
Dynamic #gadgets for math genius! #maths
00:29
FLIP FLOP Hacks
Рет қаралды 19 МЛН