0
0
Postmantesting~5 mins

Response body inspection in Postman - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is response body inspection in API testing?
Response body inspection is the process of checking the data returned by an API after a request to ensure it matches expected results.
Click to reveal answer
beginner
How can you view the response body in Postman?
After sending a request in Postman, the response body appears in the lower panel under the Body tab, where you can see the returned data in formats like JSON, XML, or HTML.
Click to reveal answer
beginner
Why is it important to check the response body in API testing?
Checking the response body ensures the API returns correct, complete, and expected data, which helps catch errors and verify functionality.
Click to reveal answer
intermediate
What Postman feature helps automate response body validation?
Postman uses tests written in JavaScript to automatically check if the response body contains expected values or structure.
Click to reveal answer
intermediate
Give an example of a simple Postman test to check if response body contains a key 'status' with value 'success'.
pm.test('Status is success', () => { pm.expect(pm.response.json().status).to.eql('success'); });
Click to reveal answer
Where do you find the response body in Postman after sending a request?
AIn the Console tab
BIn the Headers tab
CIn the Body tab of the response section
DIn the Authorization tab
What is the main purpose of inspecting the response body in API testing?
ATo measure response time
BTo check if the API returns expected data
CTo check the API request headers
DTo validate the API URL
Which language is used to write tests for response body validation in Postman?
AJavaScript
BPython
CJava
DRuby
What does this Postman test check? pm.test('Check', () => { pm.expect(pm.response.json().code).to.eql(200); });
AIf the response JSON has a 'code' key with value 200
BIf the response status code is 200
CIf the request URL contains 'code'
DIf the response headers include 'code'
Which format is commonly used for response bodies in APIs and easily inspected in Postman?
AEXE
BCSV
CTXT
DJSON
Explain how you would inspect and validate the response body of an API using Postman.
Think about the Postman interface and test scripting.
You got /4 concepts.
    Why is response body inspection crucial in API testing? Give examples of what you might check.
    Consider the role of response data in confirming API behavior.
    You got /3 concepts.