GUIDE 03 · VALIDATE A RESPONSE
Turn a response into a test
A request tells you what came back. An assertion tells you whether it was what you expected.
Add an assertion
Open a request and choose + Add assertion. Start with a status-code check, then add a JSON field, response-header or response-time check where it matters.
Choose a clear expectation
Set the target, operator and expected value. Keep assertions focused on stable parts of the API contract rather than volatile fields.
Add scripts only when useful
Pre-request scripts run before a request; response-test scripts run after it. Collection and folder scripts are inherited by their descendant requests. The visible chain shows which levels contribute.
Run and review
Use Run on the collection. Expand a request row to see its result and test outcomes. A cancelled run prevents later requests from being scheduled; the in-flight request may still finish or time out.
The scripting API is a documented subset. Unsupported APIs fail explicitly; do not assume full Postman sandbox compatibility.
← All guides