Bird
Raised Fist0
Postmantesting~20 mins

Creating collections in Postman - Practice Exercises

Choose your learning style10 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.

Practice

(1/5)
1. What is the main purpose of creating a collection in Postman?
easy
A. To group API requests for better organization
B. To write code in Postman
C. To change the API server settings
D. To create user accounts

Solution

  1. Step 1: Understand what collections do

    Collections in Postman are used to group API requests together.
  2. Step 2: Identify the main benefit

    This grouping helps organize requests and makes testing easier.
  3. Final Answer:

    To group API requests for better organization -> Option A
  4. Quick Check:

    Collections = Group API requests [OK]
Hint: Collections group requests to keep tests organized [OK]
Common Mistakes:
  • Thinking collections are for coding
  • Confusing collections with server settings
  • Assuming collections create user accounts
2. Which of the following is the correct way to create a new collection in Postman?
easy
A. Go to settings and change the environment
B. Right-click on a request and select 'Delete'
C. Click the 'New' button and select 'Collection'
D. Open the console and type 'create collection'

Solution

  1. Step 1: Locate how to create collections

    In Postman, you create collections by clicking the 'New' button.
  2. Step 2: Select the correct option

    After clicking 'New', you choose 'Collection' to create one.
  3. Final Answer:

    Click the 'New' button and select 'Collection' -> Option C
  4. Quick Check:

    Create collection = New button > Collection [OK]
Hint: Use 'New' button to start creating collections [OK]
Common Mistakes:
  • Trying to delete requests to create collections
  • Changing environment instead of creating collections
  • Typing commands in console to create collections
3. Consider this scenario: You create a collection named 'User APIs' and add three requests to it. What will you see in the Postman sidebar?
medium
A. A folder named 'User APIs' containing the three requests
B. Three separate collections named after each request
C. Only one request visible without any collection
D. An error message about duplicate requests

Solution

  1. Step 1: Understand collection structure

    A collection acts like a folder holding multiple requests.
  2. Step 2: Visualize sidebar display

    The sidebar shows the collection name with its requests nested inside.
  3. Final Answer:

    A folder named 'User APIs' containing the three requests -> Option A
  4. Quick Check:

    Collection = Folder with requests inside [OK]
Hint: Collections appear as folders with requests inside [OK]
Common Mistakes:
  • Thinking each request becomes its own collection
  • Expecting requests to appear without collections
  • Assuming errors occur when adding multiple requests
4. You tried to add a request to a collection but it did not appear inside. What is the most likely mistake?
medium
A. You created a new collection instead of adding to existing one
B. You forgot to save the request after adding it to the collection
C. You closed Postman before adding the request
D. You changed the environment instead of adding the request

Solution

  1. Step 1: Check the process of adding requests

    After adding a request to a collection, you must save it to confirm.
  2. Step 2: Identify common user error

    Forgetting to save means the request won't appear in the collection.
  3. Final Answer:

    You forgot to save the request after adding it to the collection -> Option B
  4. Quick Check:

    Save request after adding = request appears [OK]
Hint: Always save requests after adding to collections [OK]
Common Mistakes:
  • Assuming creating new collection adds request automatically
  • Closing app before saving changes
  • Mixing environment changes with request additions
5. You want to share a set of API tests with your team using Postman collections. Which steps should you follow to create and share the collection properly?
hard
A. Export environment variables only without collections
B. Create individual requests without collections and email each request
C. Change the workspace settings to public without creating collections
D. Create a collection, add requests, save it, then use the 'Share' option to send a link

Solution

  1. Step 1: Create and organize requests in a collection

    First, create a collection and add all relevant API requests to it.
  2. Step 2: Save the collection and use sharing features

    Save the collection and then use Postman's 'Share' option to generate a link or invite team members.
  3. Final Answer:

    Create a collection, add requests, save it, then use the 'Share' option to send a link -> Option D
  4. Quick Check:

    Share collections by saving and using Share link [OK]
Hint: Save collections and use Share link to share with team [OK]
Common Mistakes:
  • Sharing requests individually instead of collections
  • Only exporting environment variables
  • Changing workspace without creating collections
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard