0
0
Postmantesting~10 mins

Folder hierarchy in Postman - Interactive Code Practice

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

Complete the code to create a new folder in Postman.

Postman
pm.collection.folders.[1]('New Folder');
Drag options to blanks, or click blank then click option'
Acreate
Badd
Cnew
Dmake
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'add' instead of 'create' which is not a valid method here.
Using 'new' or 'make' which are not Postman folder methods.
2fill in blank
medium

Complete the code to access the name of a folder in Postman.

Postman
let folderName = pm.collection.folders.get('123').[1];
Drag options to blanks, or click blank then click option'
Aid
Btitle
Clabel
Dname
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'id' which is the folder's identifier, not its name.
Using 'title' or 'label' which are not standard folder properties.
3fill in blank
hard

Fix the error in the code to list all folders in a collection.

Postman
pm.collection.folders.[1](folder => console.log(folder.name));
Drag options to blanks, or click blank then click option'
Afilter
Bmap
CforEach
Dreduce
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'map' which returns a new array but does not just perform an action.
Using 'filter' which selects items but does not iterate for side effects.
Using 'reduce' which combines items into a single value.
4fill in blank
hard

Fill both blanks to create a folder and add a request to it.

Postman
let folder = pm.collection.folders.[1]('API Tests');
folder.[2](pm.request);
Drag options to blanks, or click blank then click option'
Acreate
Badd
Cinsert
Dappend
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'insert' or 'append' which are not Postman folder methods.
Using 'add' to create a folder which is incorrect.
5fill in blank
hard

Fill all three blanks to rename a folder and move a request into it.

Postman
let folder = pm.collection.folders.get('456');
folder.[1] = 'New Folder Name';
pm.collection.requests.[2](pm.request);
folder.[3](pm.request.id);
Drag options to blanks, or click blank then click option'
Aname
Badd
CmoveRequest
Dupdate
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'update' instead of 'moveRequest' which is not a valid method.
Trying to set 'title' instead of 'name' for renaming.