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

Quiz: Postman · Question 8 of 10

Which line in a Postman test checks that the response JSON contains the course title "Java Full Stack"?

Which line in a Postman test checks that the response JSON contains the course title "Java Full Stack"?

  1. A.pm.response.to.have.status(200)
  2. B.pm.expect(pm.response.json().map(c => c.title)).to.include('Java Full Stack')
  3. C.pm.environment.set('title', 'Java Full Stack')
  4. D.pm.sendRequest('Java Full Stack')
Answer & explanation

Correct answer: pm.expect(pm.response.json().map(c => c.title)).to.include('Java Full Stack')

pm.response.json() parses the body; pm.expect makes the assertion.

Can you get the rest right without peeking?

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

Start the quiz →