0
0
Postmantesting~10 mins

Creating collections in Postman - Interactive 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 Postman collection with a name.

Postman
const collection = new Collection({ name: [1] });
Drag options to blanks, or click blank then click option'
A"My Collection"
BMy Collection
CcollectionName
Dnew Collection
Attempts:
3 left
💡 Hint
Common Mistakes
Forgetting to put quotes around the collection name.
Using a variable name without defining it.
2fill in blank
medium

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

Postman
collection.items.add(new Request({ url: [1], method: 'GET' }));
Drag options to blanks, or click blank then click option'
Ahttps://api.example.com/data
Burl
C"https://api.example.com/data"
DGET
Attempts:
3 left
💡 Hint
Common Mistakes
Not using quotes around the URL string.
Using the HTTP method as the URL.
3fill in blank
hard

Fix the error in the code to correctly create a collection with an empty array of items.

Postman
const collection = new Collection({ name: "Test", items: [1] });
Drag options to blanks, or click blank then click option'
A{}
Bnull
C0
D[]
Attempts:
3 left
💡 Hint
Common Mistakes
Using an object {} instead of an array.
Using null or zero which are invalid for items.
4fill in blank
hard

Fill both blanks to create a collection and add a request with a POST method.

Postman
const collection = new Collection({ name: [1], items: [] });
collection.items.add(new Request({ url: "https://api.test.com", method: [2] }));
Drag options to blanks, or click blank then click option'
A"API Collection"
B"POST"
C"GET"
D"Test Collection"
Attempts:
3 left
💡 Hint
Common Mistakes
Using GET instead of POST for the method.
Not using quotes around strings.
5fill in blank
hard

Fill all three blanks to create a collection with a request that has a URL, method, and description.

Postman
const collection = new Collection({ name: [1], items: [] });
const request = new Request({ url: [2], method: [3] });
request.description = "Sample request";
collection.items.add(request);
Drag options to blanks, or click blank then click option'
A"Sample Collection"
B"https://api.sample.com"
C"GET"
D"POST"
Attempts:
3 left
💡 Hint
Common Mistakes
Using POST instead of GET for the method.
Forgetting quotes around strings.