Request/Response Assertion
A request/response assertion checks that an API's actual response — status code, headers, body content and structure — matches what was expected for a given request. It's the core mechanism that turns "I sent a request and got something back" into an actual pass/fail test result.
Thorough assertions go beyond just checking the status code: verifying response headers (content type, caching directives), the exact shape and values in the body (often via JSON Schema), response time within an acceptable bound, and — for error cases — that the error message and code are the specific ones expected, not just "some error occurred."
Tools like Postman, REST-assured, and Playwright's API testing support all provide fluent assertion syntax specifically for this, letting a test chain several checks against one response without needing to write custom comparison logic by hand.