Postman Flashcards
1
Q
What is the general syntax of a Postman test?
A
pm.test("Returns a book object", () => { code here })
2
Q
How do you assert a response to have a specific property?
A
pm.expect(data).to.have.property("title");
3
Q
How to do you parse the response of a request into a usable JSON object for writing Postman tests?
A
const getData = () => pm.response.json().data;
4
Q
How do you assert values in Postman tests?
A
pm.expect(data.title).to.equal("Sapiens");
5
Q
A