API Studio by DigDevBox

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.

  1. 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.

  2. 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.

  3. 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.

  4. 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