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