PostMan –Response- Validation
Inorder the validate response in postMan , we have to go
for snippets
Assert / Snippets(tests) : Assertion is feature available
in all postMan tool which is used to validate expected
result of the API response or API test Case
Assertion available in postMan
1. status code is 200 : used to verify the status
Code the get request
2. status code for Post Request 201 :
used to verify the status Code the Post request
3. status code name has String : used to verify the
status Code String
EG : 200 Successful
201 Created
204 No Content
422 Unprocessable Entity
4. Response Body Contains String : used to verify
the expected data at least available in
response body
5. Response body Json value Check : used to
navigate to specific location using JSONXpath &
verify the expected data available or not ?
6. ResponseBody is less than 200 : used to the
time taken between the request & response
7. SendRequest : used to perform request chaining
How to verify the Complex Response?
In order to verify the complex response, we have to write
“JSONPATH” to navigate to specific data in response body
then verify the expected result using “JASON value check”
assert
EG 2:
EG:3
What is Request chaining or Properties transfer or API
Chaining?
How to Automate End-2 End Scenario in API testing?
Getting the data from one response API & pass same data to
another request API is called Request Chaining
EG : 2
EG :3