🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: REST Assured: all 10 questions

Quiz: REST Assured · Question 10 of 10

Why should API tests include negative cases such as invalid data returning 400?

Why should API tests include negative cases such as invalid data returning 400?

  1. A.They are optional decoration
  2. B.Many real bugs and security holes are in how the API handles bad or unauthorised requests
  3. C.Negative tests run faster
  4. D.REST Assured needs them to compile
Answer & explanation

Correct answer: Many real bugs and security holes are in how the API handles bad or unauthorised requests

Happy-path tests alone miss missing validation and broken access checks.

Can you get the rest right without peeking?

Take the timed Quiz: REST Assured quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →