Session 4: API Testing | Postman | API Response Validations | Different types of Assertions
ฝัง
- เผยแพร่เมื่อ 27 พ.ย. 2022
- #apitesting #postman #sdet #json
Topics Covered:
1) Validating Response by adding Tests
2) Testing status codes
3) Testing headers
4) Testing cookies
5) Testing response time
6) Testing response body
7) Testing JSON Schema
@5:58 Assertion library
@9:16 Testing status codes
@11:37 assertion Syntax for single status
@13:07 assertion Syntax for multiple status
@15:33 assertion Syntax for status code text
@17:12 Using assertions in POSTMAN for status code
@18:27 Using multiple assertions in POSTMAN for status code
@19:28 Seeing test results in POSTMAN
@26:33 Using assertions in POSTMAN for header and its value
@26:46 Seeing test results in POSTMAN
@30:58 Using assertions in POSTMAN for cookies
@31:20 Seeing test results in POSTMAN
@32:08 Using assertions in POSTMAN for response time
@34:24 Seeing test results in POSTMAN
@38:51 assertion Syntax for type of data
@44:07 Verifying value type in POSTMAN for type of data & seeing test results
@47:59 assertion Syntax for validating JSON array contents
@50:21 Verifying value type in POSTMAN for JSON array contents & seeing test results
@52:13 assertion Syntax for validating JSON fields
@55:45 Verifying JSON array contents in POSTMAN & seeing test results
@01:01:17 JSON Schema
@01:03:23 Generating JSON Schema
@01:07:14 assertion Syntax for validating JSON Schema
@01:09:14 Verifying JSON schema in POSTMAN & seeing test results
@01:15:03 Run as collections
##########################
Udemy Courses:
##########################
Manual Testing+Agile with Jira Tool
***********************
► shorturl.at/xNXZ4
Selenium with Java+Cucumber
*****************
► shorturl.at/aIKMW
Selenium with Python & PyTest
******************
► shorturl.at/ELW09
Selenium with python using Robot framework
******************
► shorturl.at/bcDPZ
API Testing(Postman, RestAssured & SoapUI)
******************
► shorturl.at/uAWY7
Web & API Automation using Cypress with Javascript
******************
► rb.gy/4uum2n
Playwright with Javascript
*******************
► shorturl.at/gALZ1
Jmeter-Performance Testing
*********
► rb.gy/ocj7r2
SDET Essencials(Full Stack QA)
********
► rb.gy/hlnf2v
Appium-Mobile Automation Testing
***********
► rb.gy/wmzv64
Java Collections
*******
► bit.ly/3S66ezE
Python Programming
******
► urlis.net/gdsfpb0s
Cucumber BDD Framework
*****
► bit.ly/3F7d69r
Protractor with Javascript
******
► urlis.net/4uddm1qb
================================
TH-cam Playlists:
================================
Manual Testing & Agile
*****
► bit.ly/3ujvaYa
► bit.ly/3OYzxQj
SQL
****
► bit.ly/3R6XjeG
► bit.ly/3nE0a1s
► bit.ly/3IeKuuJ
linux & Shell Scripting
*****
► bit.ly/3up1Z6a
► bit.ly/3nzvGxx
Java
*****
► bit.ly/3R9QfOs
► bit.ly/3AoRMKM
► bit.ly/3IbTTDn
► bit.ly/3ybXInv
► bit.ly/3yCoHdw
Selenium With Java+Cucumber
********
► bit.ly/3P2FMm4
► bit.ly/3yhiIt4
► bit.ly/3uokzet
► bit.ly/3a7XIND
► bit.ly/3umN2S9
► bit.ly/3aar7GW
► bit.ly/3y9kD2S
► bit.ly/3uhLskn
Python
*******
► bit.ly/3agNgU0
► bit.ly/3NJNnoy
► bit.ly/2CTQ4mR
► bit.ly/3OIYWh1
Selenium With Python,Pytest&Behave
*************
► bit.ly/3OHHoC9
► bit.ly/3IeNLdv
► bit.ly/2J4tPeT
► bit.ly/3ydSkAq
Selenium With Python Using Robert Framework
(Web&API Testing)
********
► bit.ly/3nUvlpr
► bit.ly/3nUvE3z
API Testing (Postman,SoapUi,&Rest Assured)
*************
► bit.ly/3OXacWY
► bit.ly/3yh0UhE
► bit.ly/3nC9DWQ
► bit.ly/3yGfhNS
► bit.ly/3OJa11H
► bit.ly/3P2slCC
Mobile App Testing Appium
************
► bit.ly/3Al49HG
Performance Testing Jmeter
************
► bit.ly/3nz4fE7
Maven,Jenkins,Git,Github,CI/CD
***********
► bit.ly/3P16HPj
► bit.ly/3yhlUVA
► bit.ly/3afYfwT
► bit.ly/3yGzweG
► bit.ly/3yF73Ws
► bit.ly/3NCOmH7
SQL,DB Testing&ETL,Bigdata
**********
► bit.ly/3NKOcNY
► bit.ly/3OVpDyI
► bit.ly/3NEvUy0
► bit.ly/3IryxlT
► bit.ly/3RkWBLh
JavaScript Based Automation Tools
************
► bit.ly/3nUx51X
► bit.ly/3AqI6Q0
► bit.ly/3yeurbT
► bit.ly/3ujzpTK
Selector Hub Tools
*******
►rb.gy/h3h424
GraphQL
********
► rb.gy/sj3gys
Cypress API Testing
*********
► shorturl.at/fjKPX
Cypress Web Testing
*********
► shorturl.at/agjlK
Playwright with Javascipt
**********
► shorturl.at/adSTY
#APITesting
#APIAutomation
#APIs
#TestingAutomation
#SoftwareTesting
#QualityAssurance
#CodeTesting
#RestAPI
#APITestCases
#TestingTools
#APIPerformance
#Postman
#TestAutomation
#APIIntegration
#Swagger
#APIQuality
#DevOpsTesting
#ContinuousIntegration
#APIEndpoints
#APIWorkflow
I am from Kazakhstan. Kazakhs are love Indian chai(tea). Nowadays I work in USA. learning API and drinking chai(tea) . Thanks for teaching us! Big respect.
You are most welcome
I am from Uzbekistan
I am from Nepal
@@bimalabhatt3508 iam from AP
I am from India
Hello sir I have really enjoyed ur teaching style.i have never seen such a best teacher.i have completed my full course with your videos.i am praying to God for giving us such wonderful teacher.
My pleasure
Unable to find the documents, Might be removed. Can you reshare atleast single link for all documents
@5:58 Assertion library
@9:16 Testing status codes
@11:37 assertion Syntax for single status
@13:07 assertion Syntax for multiple status
@15:33 assertion Syntax for status code text
@17:12 Using assertions in POSTMAN for status code
@18:27 Using multiple assertions in POSTMAN for status code
@19:28 Seeing test results in POSTMAN
@26:33 Using assertions in POSTMAN for header and its value
@26:46 Seeing test results in POSTMAN
@30:58 Using assertions in POSTMAN for cookies
@31:20 Seeing test results in POSTMAN
@32:08 Using assertions in POSTMAN for response time
@34:24 Seeing test results in POSTMAN
@38:51 assertion Syntax for type of data
@44:07 Verifying value type in POSTMAN for type of data & seeing test results
@47:59 assertion Syntax for validating JSON array contents
@50:21 Verifying value type in POSTMAN for JSON array contents & seeing test results
@52:13 assertion Syntax for validating JSON fields
@55:45 Verifying JSON array contents in POSTMAN & seeing test results
@01:01:17 JSON Schema
@01:03:23 Generating JSON Schema
@01:07:14 assertion Syntax for validating JSON Schema
@01:09:14 Verifying JSON schema in POSTMAN & seeing test results
@01:15:03 Run as collections
You are an amazing teacher. I have similar course that I paid and downloaded from Udemy but nothing compares to this course. I have stopped watching it after I found this one. I cant thank you enough for the time that you have put into this course to teach knowledge seekers like me. God Bless you Sir!!.
I never knew APIs but after watching this series, I have learned so much I can now start doing tests for APIs
You are the most amazing faculty one can have ❤ undoubtedly you must be receiving alot of blessings and especially from those who can't afford but really want to learn. You are blessing for all !! Cant thank enough for your efforts and knowledge you are sharing.
My pleasure
Hi Soniabajaj
So far you are the best teacher for all different technology on You Tube that I found. Thank you so much for what you do.
Welcome
The flow from start to end describes how much you are expert on Testing
I wanted to take a moment to express my heartfelt gratitude for the incredible tutorial you provided on API testing. Your clear explanations and detailed examples have helped me gain a deeper understanding of this important aspect of software testing.
I truly appreciate the effort you put into creating such informative and engaging content. Your teaching style is exceptional, making complex concepts easy to comprehend. The way you broke down the client-server architecture and explained the role of APIs as mediators between front-end and back-end applications was particularly enlightening.
Thanks to your tutorial, I have learned so much and feel more confident in my ability to perform API testing. Your dedication to sharing knowledge and helping others is truly inspiring.
Best regards,
jalal Khan
一天听一节课,每天感激您一些😀
I don't exact about the testing and postman after watching your videos, now am sure don't want another Channel for same course. This is enough for everything , Thank you so much , uploaded great videos ❤
You're a saviour honestly. Thankyou so much for explaining everything so clearly😇
You’re welcome
Thank you sir, I watched several videos about Postman, but this one is the best. Clear and very informative.
Welcome
Hi sir currently I am working candidate in it this video's are very helpful to me. I pray to god to give much more healthy life for long time. thank you so much for giving this wonderful teaching stuff.
Welcome
All your lectures are highly informative. Great job.
Thanks
you teaching skills are exlent sir....the way of explanation is very good..
Thanks
👍 thank you again to teach us validation section in very easy way..we ll oblised to you always.🙏
Welcome
sir your videos are so detailed and you make things so simple to understand. thank you so much for all the efforts you put in. God bless you.
You are most welcome
Thank you sir from bottom of my heart you and your videos help me to get job on testing 😢
Every points and details are so precise thank you sir ❤❤❤❤
It's my pleasure
vous expliquez tellement bien , merci pour vos videos
Nice Explanation 🙏
One request please cover the concept of mocking the api’s using mock server with as much as negative status codes.
Thanks in advance
One of the best tutorial available so far.
Glad it was helpful!
Hi sir your teaching is marvelous. Explained every topic very clearly. Can you tell us how to get the pdf it will be more helpful. Thank you🥰🙂
Thank you so much sir, for teaching valuable topics to every test engineer in the world
Welcome
Hats off Sir! You have Simple and Great teaching method .
Thanks
I learned so much. Thank you from Russia!
You are welcome
where do i find the document shown in this video, checked on site didnt find it
Thank you so much sir... I was learning by my own.. But you cleard my concepts... 😊
Glad to hear that
Thank you sir from bottom of my heart you and your videos help me to get job on testing 😢
Every points and details are so precise thank you sir
It's my pleasure
💖😍Thankyou so much for teaching❤i love your way of teaching and your step by step explanation everything is Excellent sir😍😍💖
Welcome
Thanks for all your effort in training on testing field. Could you please provide video to clear ISTQB exam
Thankyou for the video... one thing I'm trying to understand is that when you have more records in your response (e.g you have 5 students returned in the response) and you want to validate the contents of the courses array, but the values are different for each student... one student has java & selenium, and another student has only java... is postman just validating the first record?
Thank you Sir, God bless you and your family!!!
Welcome
Great Teaching. Really Unforgettable. Thanks a lot.
Welcome
Sir, lots and lots and lots of thanks to you sir, what a wonderful explanation. Love u sir.
You are most welcome
Sir thank you so much for your time and efforts its really easy to gain knowledge by just going through your playlist.
But for this API series you have given link in description to access related documents but while opening that it says content are no longer present.
Can you or anyone from here please share documents again or any other available link ?
Thanku so much sir for providing commendable lectures ..easy to understand 🙏🙏
It's my pleasure
Big Salute to you sir 🙏
You did it very well and its a best tutorial which I have ever come across so far, thank you so much and keep motivating us pls. I have one clarification pls, can we skip data type validation of the values in the response if we do schema validation? I believe this would do all the field type validation. Please confirm
Hands off sir 🙌
I haven't seen this kind of teaching in my career so far. Thanks a lot for the free knowledge-sharing ❤
Sir, can you please provide us material or documents PDFs it helps a lot in practicing
Share us drive link or telegram in any of your convenient ways
awesom teaching sir waiting for other courses . Please do many videos on python frmae works and AWS as well sir.
I want to know how I will validate my response value which is changed on every api call. Like how can I write a test case for that? It will be really helpful if you try to explain it in your next video.
Thanks so much for another amazing session.
Welcome
Firstly I'm so grateful to you.... Secondly, How can I get the materials which you are explaining from it?
Thank you so much sir for API serias.
I have to add some API points in my resume which API points should I mention in my resume .
Really very useful tutorials and explained neatly.
Glad it was helpful
Thank you so much sir It's Amazing teaching Style ❤🙏🏽💐💐
Welcome
Can JSON Schema validation be explained better? A big no! Thanks for this clear explanation.
Hello Sir, I have been watching your manual testing videos and learned a lot till now. I am confused about the different types of documentations that are being done. Like, is SRS and FRS same ? And Differences between BRS and Project Plan. Can you please share ?
Yes I also have a similar doubt, that from where we get our expected data while validation for ex. Content type should be '-----' , so from from where we get that expected datA
Thank you so much ! you are amazing.
I'd like to ask a question concerning Json schema please. Since, do we have to use data type validation and Json schema validation assertions in postman or only Json schema will be sufficient, since the latter is also validating the data type. Thank you
Sir the documents have been removed. Can you please upload it somewhere again and thank you for all the awesome videos ❤
Very grateful to have Teacher like you have, I get so much knowledge from your videos. just asked one thing from where i can get those JSON File and dummy API drive folder because in description i'm not able to find and in previous videos also not able to found, please guide me on this sir
Your class is great!thank you sir!
You are welcome
Hello sir! Thanks for the course! I would like to ask you, how will we know which one to use?? (pm.response or pm.expect)
I have question sir In Any Application home page there are many APIs in which .which api need to test first?
Hi sir. Your explanation is very easy to understand.
Thanks
Guys, where can i find the pdf file in the video?
Hello sir I extend my sincere thanks for your wonderful efforts on this great explanation You are truly a wonderful person. I rewrote the document you explain from, and I was wondering if you would allow me to share it with my fellow learners?
Hello Sir,
Great work sirji by yoy
Your teaching technique is truly awesome, I am actually from a non-technical background but after watching your video I feel I am a full technical and knowledgeable person now
I am trying to learn the Postman tool for the last few days, I have created the API database on my local machine, and I used all assertions but I have a problem with the cookies assertion coz I did not get any cookies on my postman tool, then how can I verify or test the cookies?
same here i didn't have any cookies
Super explanation sir Total how many session s are there
thank you sir for such amazing lecture on postman , may lord bless you with abundance of health and wealth
sir one question why i didn't get ant cookies in my postman tool for testing them, please tell us as some of the students are not getting cookies.
Thank you Sir☺🙏
Same Here. I too didn't get any cookies in my Postman.
Hi Sir,May I know where can I find the documents which you are using in the videos????
Thank you so much for your time and efforts sir.
But for this API series I am not able to find the documents can you please share it ?
Hello SIr, I have a query like, When there is a huge data while getting response back, I'm getting 500 status code. Is there is any solution for it, like can we increase response waiting time for that?
Hi Sir,
I am not able to get the notes of the video. I have clicked on the document link, it is showing uploaded content does not exists.. Can you please guide me if there are any other ways of accessing it.
Hi, thank you so much sharing these valuable videos.
i have a question, i tried validating the cookies but I don't see any cookies being generated and because of that my test failed. may i know why cookies are not getting populated in the field?
For me also , Cookies are not getting generated in the Response after hitting the API ..
Did you find an answer to it?
Please make a Video of RestAPI with Python, I watched your Python with selenium series It's really beneficial for me, Thanks...
Thank you so much.. Can you please provide us the document on chai assertion library.
Sir, when i am doing validation(status code 200), in test results it is throwing syntax error:invalid or unexpected token. What would be the reason for that error?
Hello sir
Do we need to remember these assertion syntax?
Nice explanation sir.
👌👌
Thanks
Hi Sir, need info. our website content type=text/html; charset=utf-8, which tool is suitable for API Testing.
Hello sir, Where can i find the response validation pdf that you used in this video?
Learned some thing new . Thanks Sir
Glad to hear that
Hello Sir, will you do video tutorials on Playwright with Python? Can you please let me know. Not finding good resources for it on youtube. Thank you!
Hi where do we get these validations i want to implement them in my postman tool
Pls share the ppt, for future reference. Thanks a lot, you are an amazing teacher.
Amazing!!! Thank you❤
You're welcome
How can i get the documents which sir is explaining and all the params?
Thanks for your time sir❤❤❤❤
Always welcome
00:00 Validating API responses using assertions
03:23 Postman Library provides functions for API response validations
09:31 Using Postman for API testing and writing validation functions
12:31 API response validations using different types of assertions in Postman
18:25 API Testing in Postman - Validating API Response
21:19 Headers in API Testing
26:45 Validating headers and cookies in API testing with Postman
29:35 Verification of cookie presence and value
35:37 Validate the response body by asserting value types
38:47 Capturing the response and performing validations on data types
44:39 Validate the type of data received in the API response
47:52 Validating if an array contains specific values
53:57 Validating data in the response using postman
57:26 Json path is important for verifying data fields
1:03:17 Generating Json Schema using online tools
1:06:39 API responses can be verified against a JSON schema
1:12:52 Json schema validation and Json path are important for validating API responses
1:15:52 Validations in API testing
Crafted by Merlin AI.
Sir i need to know that pm request right that expect , response, all of the things we have to remember? validation paragraph?
Sir, do we have to do any changes under students.json file for Cookies? As i am unable to get options under Cookies.
add your own
1.- below the send button click on cookies
2.-add your domain (URL) to the add domain field and click Add domain
3.-change the name and value to what you want
I want to do complete ecommerce domain project with end to end testing practically...can you tell how much fess is there for that
hello sir,where are you uploading the document and how to access it can you please tell? i have attained your java -selenium batch and going through the Api series now.
ya I have same query , did u find those ppts which he is explaining in the lecture ?
No@@snehalraut821
Sir,we are doing api testing manually here, then why are we using assertion for response validation.
hello Sir, where I can find documents, I am not able to find in description.
About the topic of asserting the data types. I have following issue. I have even literally rewrritten test API from last episode. No matter what I do, the assertions do not work, as my response is not treated as an object but as an array.
I get the response embedded in the [ ] additionally and postman says that test is failed because i expect the array to be an object. As I say, I have even rewritten 1:1 whole json file and still get this error.
For me to work, I must use the allocation of the array element to have assertions working >>> pm.expect(jsonData[0]).to.be.an('object').
Also, despite defining the ID and number as the numbers, they are converted by postman to strings.
As a result, the schema test fails once i generate the schema where it says - response type = object and id type = integer. I have 1:1 same json file as you have... If i change obviously first one to array and id type to string - works perfectly then
Hello Sir , If we want to validate a GET API response , how to code it and validate the results? Can we use the assertions as per your this session!
This was asked to me in of the interviews
Awesome videos
Thanks
sir...nenu 2014 passed out.last 2 years nunchi upsc civils prepare avtunna..Nenu software testing selenium and appium lo course chesa and 6 months realtime work experience vundi..incase nenu upsc civils exam lo succsess kalekapote after 5 years IT lo job cheyagalana?try cheste job vastunda?? Plz reply
Hi,
I tried doing response body validation and test is failing, when i write
pm.expect(jsonData).to.be.an("object") ;
Test is getting passed when i write
pm.expect(jsonData).to.be.an("array");
Can you help on this.
In your video pm.expect(jsonData).to.be.an("object"); is showing as pass.
Thank you
Respected sir, Thank you for your entire series.. It really helps alot.... Request you to please provide download link for the file.
How to find postman documents ? which you used in this video sir? I am from pakistan.
Hi Pavan , I am unable to join to channel , I have tried multiple times but payment is declining , is there any other way to purchase please assist .
Hello Sir, Where can we have the documentation used in the API videos ? Can you make videos on C# and Selenium C# using Visual Studio ? I really like your videos.
Sir, Where i get the Documents that You show in video
Hello sir. Thank u so much for ur sessions and classes. I am incredibly happy with wat i am learning from dis platform. I have recently completed the course sessions on manual testing for beginners..i am a complete new to it world. I am also preparing all the possible expected interview queries.
My main fear is , i am an engineering student who passed out a decade ago exactly. Presently being a home maker and a mother of kid can I expect any company dat can really hire me or PPL like me. I have been hesitating to apply anywhr becoz of did reason.. what i am expecting from u sir , is to plz guide me if der is any kind of break through from dis situation. Can I really work in dis field can i axpect if der is a company out der u recive and give opportunity to PPL like us..
I really want to start my career now after a decade . Is it possible and how and from whr can i pursue???
Thank u sir
passed out when
2012 passed out sir. Engeneering in bio-technology .
I think it's not possible anthaku chala gap undhi kadh and miru em aeina job chesara madhaylo
@@maheshmittas3023 nope ... Thanks for the comment.. i know i am hoping for something which is not possible. It's jus the feeling of regretting dat i couldn't do anything... I have been asked many times like " oohh u are an engineering graduate,yet not working" dis really hits me hard . So I wish I could earn some money for my self-respect..
@@renukapd2471 ok don't worry u have best communication skills u can try for other jobs you will definitely achieve
where did uh share this document please let me know ???????? sir
Please take a session5, I didn't see any live video link for Session5