Postman Flashcards

1
Q

What is the general syntax of a Postman test?

A
pm.test("Returns a book object", () => {
code here
})
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How do you assert a response to have a specific property?

A
pm.expect(data).to.have.property("title");
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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;
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How do you assert values in Postman tests?

A
pm.expect(data.title).to.equal("Sapiens");
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly