API Testing · Middle · Question 50 of 75

What does Postman's pm.response.to.have.jsonSchema(schema) do?

Show the answer

Correct answer: Validates the response body against a JSON Schema

Explanation

It turns a structure check into one assertion. Keep schemas in shared variables or files to reuse them.

Further reading

Problem with a question

API Testing · Middle · question 50

Test yourself

Take the API Testing · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz