0
0
Postmantesting~20 mins

Creating collections in Postman - Practice Exercises

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Postman Collection Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding Postman Collection Structure

Which part of a Postman collection JSON file defines the requests included in the collection?

AThe <code>info</code> object holds the request details like URL and method.
BThe <code>item</code> array contains all requests and folders in the collection.
CThe <code>event</code> array lists the requests inside the collection.
DThe <code>variable</code> object stores the request headers.
Attempts:
2 left
💡 Hint

Think about where Postman groups requests and folders inside a collection.

Predict Output
intermediate
2:00remaining
Output of Adding a Request to a Collection

Given this snippet of a Postman collection JSON, how many requests does the collection contain?

{
  "info": {"name": "Sample Collection"},
  "item": [
    {"name": "Get Users", "request": {"method": "GET", "url": "https://api.example.com/users"}},
    {"name": "Create User", "request": {"method": "POST", "url": "https://api.example.com/users"}}
  ]
}
A3
B1
C0
D2
Attempts:
2 left
💡 Hint

Count the number of objects inside the item array that have a request field.

locator
advanced
2:00remaining
Best Locator for a Request in Postman Collection JSON

In a Postman collection JSON, which key path correctly locates the HTTP method of the first request?

A<code>request.item[0].method</code>
B<code>info.item.request.method</code>
C<code>item[0].request.method</code>
D<code>item.request[0].method</code>
Attempts:
2 left
💡 Hint

Remember that item is an array of requests or folders, and each request is inside an item element.

assertion
advanced
2:00remaining
Valid Assertion for Postman Collection Request Count

Which assertion correctly verifies that a Postman collection JSON has exactly 3 requests?

Postman
const collection = {
  item: [
    { request: {} },
    { request: {} },
    { request: {} }
  ]
};
Aassert.equal(collection.item.length, 3);
Bassert.equal(collection.request.length, 3);
Cassert.equal(collection.items.length, 3);
Dassert.equal(collection.item.requests.length, 3);
Attempts:
2 left
💡 Hint

Check the exact key name that holds the requests array.

framework
expert
2:00remaining
Automating Collection Creation with Postman API

Which HTTP method and endpoint combination correctly creates a new collection using the Postman API?

APOST https://api.getpostman.com/collections
BPUT https://api.getpostman.com/collections
CGET https://api.getpostman.com/collections
DDELETE https://api.getpostman.com/collections
Attempts:
2 left
💡 Hint

Creating a resource usually uses a specific HTTP method.