MCQs on Building Requests and Collections | Postman MCQs Questions and Answers

Postman is a popular API testing tool that simplifies building, testing, and managing API requests. This guide offers 30 Postman MCQ questions and answers focused on creating and managing requests, using query parameters, headers, authentication, and variables. Perfect for developers and testers, these questions ensure a solid understanding of Postman essentials.


1. Creating and Managing Requests

  1. What is a request in Postman?
    a) A user interface element
    b) A call to an API endpoint
    c) A function for debugging code
    d) A type of authentication method
  2. Which HTTP method is used to retrieve data from an API?
    a) POST
    b) GET
    c) PUT
    d) DELETE
  3. Where do you enter the API endpoint in Postman?
    a) Authorization tab
    b) Headers section
    c) URL bar
    d) Body section
  4. How can you save a request in Postman?
    a) By adding it to a collection
    b) By bookmarking it
    c) By exporting it as a file
    d) By running it in a runner
  5. What is the primary use of the Body tab in Postman?
    a) For entering request headers
    b) For specifying HTTP methods
    c) For adding data to requests
    d) For managing API endpoints

2. Using Query Parameters and Headers

  1. What are query parameters used for in an API request?
    a) To send authentication details
    b) To modify the request endpoint
    c) To pass additional data to the server
    d) To control server response headers
  2. How are query parameters appended to a URL in Postman?
    a) Using a semicolon (;)
    b) Using a colon (:)
    c) Using a question mark (?) followed by key-value pairs
    d) Using a hash (#)
  3. What are headers in an API request?
    a) Server-side configuration files
    b) Key-value pairs containing metadata about the request
    c) Mandatory parts of the request body
    d) Random data used for debugging
  4. Which header is commonly used for JSON data?
    a) Accept-Encoding
    b) Content-Type
    c) Authorization
    d) Cache-Control
  5. How can you add multiple query parameters to a request in Postman?
    a) By separating them with a comma (,)
    b) By using the Postman Query Params section
    c) By adding them to the Headers section
    d) By specifying them in the Pre-request script

3. Authentication in Postman

  1. Which of these is an authentication method in Postman?
    a) Basic Auth
    b) GraphQL
    c) SQL Injection
    d) JSON Auth
  2. Where is the API key usually included in an API request?
    a) In the request body
    b) In the query parameters or headers
    c) In the URL domain
    d) In the response data
  3. What is the primary function of OAuth 2.0?
    a) To debug requests
    b) To secure access by providing tokens
    c) To log API errors
    d) To store server configurations
  4. In Basic Authentication, what is required?
    a) API token and public key
    b) Username and password
    c) Client ID and secret key
    d) Access token
  5. What type of data is passed in a Bearer Token?
    a) API version number
    b) Encrypted user credentials
    c) User permissions metadata
    d) Encrypted authentication token

4. Building and Managing Collections

  1. What is a collection in Postman?
    a) A group of test results
    b) A saved group of requests organized into folders
    c) A set of HTTP headers
    d) A plugin for Postman
  2. Why use collections in Postman?
    a) To replace authentication
    b) To organize and manage related requests
    c) To export environment variables
    d) To debug server issues
  3. How do you share a collection in Postman?
    a) By saving it locally
    b) By using the Share button and generating a link
    c) By copying it to the clipboard
    d) By attaching it in an email
  4. What is the Postman Runner used for?
    a) To run collections in sequence
    b) To execute individual requests
    c) To manage API keys
    d) To track server logs
  5. How can collections be exported in Postman?
    a) As a JSON file
    b) As an XML file
    c) As an HTML file
    d) As a YAML file

5. Introduction to Variables

  1. What is a global variable in Postman?
    a) A variable shared across all requests and collections
    b) A variable stored locally on the server
    c) A variable specific to a single collection
    d) A variable that cannot be updated
  2. Which variable is specific to a single collection in Postman?
    a) Global variable
    b) Collection variable
    c) Environment variable
    d) Random variable
  3. What is an environment variable used for in Postman?
    a) To define file structures
    b) To store API keys or base URLs for different environments
    c) To debug request headers
    d) To manage API responses
  4. How do you reference a variable in Postman?
    a) Using {{variable_name}} syntax
    b) Using [[variable_name]] syntax
    c) Using <variable_name> syntax
    d) Using %variable_name% syntax
  5. Where can you define global variables in Postman?
    a) In the Collection tab
    b) In the Environment tab
    c) In the Globals tab
    d) In the Body tab

6. Using Pre-Request Scripts and Tests

  1. What is a Pre-Request Script in Postman?
    a) A script that defines the server’s response
    b) A script that runs before a request is sent
    c) A test script for validating response data
    d) A script for managing headers
  2. Which language is used for scripting in Postman?
    a) Python
    b) JavaScript
    c) Ruby
    d) PHP
  3. What is a common use case for Pre-Request Scripts?
    a) Automating server configurations
    b) Setting dynamic variables or headers before a request
    c) Formatting API responses
    d) Validating response codes
  4. What is a Test script in Postman?
    a) A script for simulating server errors
    b) A script for running multiple requests
    c) A script for validating API responses and logic
    d) A script for managing global variables
  5. How can you check the response status code in a Postman test script?
    a) Using pm.response.to.have.status(code)
    b) Using console.log(status_code)
    c) Using pm.sendRequest(code)
    d) Using status(response)

Answers

QNoAnswer (Option with the text)
1b) A call to an API endpoint
2b) GET
3c) URL bar
4a) By adding it to a collection
5c) For adding data to requests
6c) To pass additional data to the server
7c) Using a question mark (?) followed by key-value pairs
8b) Key-value pairs containing metadata about the request
9b) Content-Type
10b) By using the Postman Query Params section
11a) Basic Auth
12b) In the query parameters or headers
13b) To secure access by providing tokens
14b) Username and password
15d) Encrypted authentication token
16b) A saved group of requests organized into folders
17b) To organize and manage related requests
18b) By using the Share button and generating a link
19a) To run collections in sequence
20a) As a JSON file
21a) A variable shared across all requests and collections
22b) Collection variable
23b) To store API keys or base URLs for different environments
24a) Using {{variable_name}} syntax
25c) In the Globals tab
26b) A script that runs before a request is sent
27b) JavaScript
28b) Setting dynamic variables or headers before a request
29c) A script for validating API responses and logic
30a) Using pm.response.to.have.status(code)

Use a Blank Sheet, Note your Answers and Finally tally with our answer at last. Give Yourself Score.

X
error: Content is protected !!
Scroll to Top