🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← All topics

Quiz: REST Assured: questions with answers

10 questions, each with the answer and a short explanation.

Take the timed quiz + get a certificate →
  1. Q1. In REST Assured, where do you put the request body and headers?
  2. Q2. A logged-in student is refused when creating a course. Which status do the tests expect?
  3. Q3. What does .extract().path("token") do?
  4. Q4. What does body("title", hasItems("Java Full Stack", "DSA in Python")) check on a list response?
  5. Q5. Why are API tests usually faster and more stable than UI tests?
  6. Q6. In REST Assured's given / when / then, what belongs in the then() part?
  7. Q7. Which status code should a test expect when a request is sent without any token to a protected endpoint?
  8. Q8. What does JSON schema validation check?
  9. Q9. How do you send a token as a Bearer header in REST Assured?
  10. Q10. Why should API tests include negative cases such as invalid data returning 400?