0
0
Postmantesting~10 mins

Why organizing requests improves workflow in Postman - Test Your Understanding

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to create a new collection in Postman.

Postman
pm.collectionVariables.set('collectionName', '[1]');
Drag options to blanks, or click blank then click option'
AMy API Tests
Bresponse
Crequest
Denvironment
Attempts:
3 left
💡 Hint
Common Mistakes
Using variable names like 'response' or 'request' instead of a collection name.
Leaving the collection name empty.
2fill in blank
medium

Complete the code to add a request to a collection in Postman.

Postman
pm.collection.addRequest({ name: 'Get User', url: '[1]', method: 'GET' });
Drag options to blanks, or click blank then click option'
APOST
Bhttps://api.example.com/users
Cresponse
Dheaders
Attempts:
3 left
💡 Hint
Common Mistakes
Using HTTP methods like 'POST' instead of the URL.
Using unrelated terms like 'response' or 'headers'.
3fill in blank
hard

Fix the error in the code to correctly save a request in a folder.

Postman
pm.collection.folders.[1]('User Requests').addRequest(request);
Drag options to blanks, or click blank then click option'
Aupdate
Bdelete
Ccreate
Dremove
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'delete' or 'remove' which remove folders.
Using 'update' which changes existing folders.
4fill in blank
hard

Fill both blanks to filter requests by method and save the filtered list.

Postman
const filtered = requests.filter(r => r.method [1] 'GET' && r.status [2] 200);
Drag options to blanks, or click blank then click option'
A===
B!==
C==
D!=
Attempts:
3 left
💡 Hint
Common Mistakes
Using '!=' or '!==' which check for inequality.
Using loose equality '==' which can cause unexpected matches.
5fill in blank
hard

Fill all three blanks to create a test that checks response status and content type.

Postman
pm.test('Status is [1]', () => { pm.response.to.have.status([2]); pm.response.to.have.header('[3]'); });
Drag options to blanks, or click blank then click option'
A200 OK
B200
CContent-Type
D404
Attempts:
3 left
💡 Hint
Common Mistakes
Using status code 404 which means not found.
Using incorrect header names like 'content-type' in wrong case.