Complete REST Assured Interview Questions & Answers
REST Assured Interview Questions and Answers REST Assured Interview Questions & Answers (Advanced) 1. What is REST Assured? Answer: REST Assured is a Java-based library used to automate RESTful APIs. It simplifies HTTP request creation and response validation using BDD-style syntax ( given-when-then ). It integrates easily with TestNG, JUnit, Maven, and CI/CD tools. 2. What are the advantages of REST Assured? Easy-to-read BDD syntax Supports JSON & XML Built-in validation for status codes, headers, body Supports authentication (OAuth, Basic, Bearer) Seamless CI/CD integration 3. Explain BDD syntax in REST Assured given() → Request specification (headers, params, auth) when() → HTTP method (GET, POST, PUT, PATCH, DELETE) then() → Response validation 4. How do you validate status code? given() .when() .get("/users/1") .then() .statusCode(200); 5. How do you validate response body? given() .when() .get("/u...