REST Assured interview questions — Hard

159 hard-level REST Assured questions from our API Testing bank, each with the correct answer and an explanation of why it is correct.

What this covers

REST Assured appears throughout API Testing interviews. At hard level, interviewers are typically checking depth under pressure — edge cases, failure modes, performance characteristics, and the trade-offs you accepted. Work through these, then explain your answer out loud; the second part is what interviews actually test.

1 example questions

  1. 1. What does .extract().path("token") accomplish in a REST Assured chain?

    • A. Sends a new request.
    • B. Pulls a value out of the response so it can be reused (e.g., chaining auth).correct
    • C. Asserts the response time.
    • D. Logs the request headers.

    Why: extract() lets you pull values (via JsonPath) out of a response to reuse later — common for grabbing an auth token from a login call.

Related API Testing topics