Postman Beginner Quiz
30 questions on Postman Testing.
Question 1: What is Postman primarily used for?
- A. UI design
- B. API testing and development β (correct answer)
- C. Database hosting
- D. CSS development
Explanation: Postman is a popular collaboration platform for API development, allowing developers to construct requests, read responses, test endpoints, and automate API workflows.
Question 2: What is a "Collection" in Postman?
- A. A group of database tables
- B. A folder that groups together related API requests, making them easier to organize, share, and execute together β (correct answer)
- C. A list of CSS styles
- D. A set of user passwords
Explanation: Collections let you group requests logically (e.g., "User Authentication endpoints"). You can attach scripts and variables to collections to run test suites seamlessly.
Question 3: Where do you add query parameters (like ?id=123) in the Postman UI?
- A. In the "Headers" tab
- B. In the "Params" tab, which automatically appends them to the URL β (correct answer)
- C. In the "Authorization" tab
- D. In the "Body" tab
Explanation: The "Params" tab provides a clean key-value table interface to construct URL query strings without manually typing them into the URL bar.
Question 4: Which tab is used to send JSON data to a server in a POST request?
- A. Authorization
- B. Params
- C. Headers
- D. Body (selecting "raw" and "JSON") β (correct answer)
Explanation: When sending data to create or update resources (POST/PUT), you configure the request Body tab, selecting raw format and JSON from the dropdown.
Question 5: What does the "Send" button in Postman do?
- A. Deletes the request
- B. Executes the configured HTTP request and fetches the response from the target server β (correct answer)
- C. Saves the request to the cloud
- D. Compiles the API code
Explanation: Clicking "Send" dispatches the HTTP request using the method, URL, headers, and body you configured, displaying the server's response in the lower pane.
Question 6: What is an "Environment" in Postman?
- A. A specific operating system
- B. A set of key-value variables that allow you to easily switch contexts (e.g., from Localhost to Production) without rewriting request URLs β (correct answer)
- C. A chat room for developers
- D. A visual theme (Dark Mode / Light Mode)
Explanation: Environments store variables like {{base_url}}. You can create a "Dev" environment (localhost:3000) and a "Prod" environment (api.example.com) and switch between them instantly.
Question 7: How do you reference an environment variable named api_key in a Postman request URL?
- A.
$api_key
- B.
<api_key>
- C.
{{api_key}} β (correct answer)
- D.
[api_key]
Explanation: Postman uses double curly braces to interpolate variables. Typing {{api_key}} instructs Postman to replace it with the actual value stored in your active environment.
Question 8: Which tab is used to configure a JWT Bearer token for a request?
- A. Authorization tab (selecting "Bearer Token") β (correct answer)
- B. Pre-request Script tab
- C. Params tab
- D. Tests tab
Explanation: The Authorization tab provides visual helpers for various auth types (Basic, Bearer, OAuth 2.0). Selecting "Bearer Token" automatically injects the correct Authorization: Bearer <token> header.
Question 9: What is the purpose of the "Pre-request Script" tab?
- A. To run JavaScript code before the HTTP request is sent (e.g., generating timestamps or dynamic hashes) β (correct answer)
- B. To validate the server's response
- C. To format the JSON body
- D. To run database migrations
Explanation: Pre-request scripts execute before the request leaves Postman. They are heavily used to set dynamic variables, calculate cryptographic hashes, or retrieve fresh auth tokens automatically.
Question 10: What is the purpose of the "Tests" tab in Postman?
- A. To write unit tests for the backend codebase
- B. To write JavaScript assertions that run after the response is received, verifying status codes or response data β (correct answer)
- C. To simulate high traffic (Load testing)
- D. To test UI components
Explanation: The Tests tab executes after the response returns. You can write scripts like pm.test("Status is 200", function () { pm.response.to.have.status(200); });.
Question 11: How can you save a value from an API response into an environment variable automatically?
- A. By copying and pasting it manually
- B. By writing a script in the "Tests" tab (e.g.,
pm.environment.set("token", value)) β (correct answer)
- C. By typing it in the URL
- D. You cannot do this in Postman
Explanation: A common workflow is logging in via a POST request, extracting the token from the response inside the Tests script, and saving it to an environment variable for subsequent requests to use automatically.
Question 12: What is a Mock Server in Postman?
- A. A server that attacks your API
- B. A fake server hosted by Postman that simulates your API endpoints by returning predefined responses, useful before the actual backend is built β (correct answer)
- C. A database backup server
- D. A server that translates languages
Explanation: Mock servers allow frontend developers to start building applications against the mock API while the backend developers are still writing the actual API code.
Question 13: What does the pm object represent in Postman scripts?
- A. Project Manager
- B. Private Method
- C. The Postman API object, which provides access to request data, response data, variables, and assertions β (correct answer)
- D. Parameter Model
Explanation: The pm global object is the core of Postman scripting, offering methods like pm.environment.get(), pm.response.json(), and pm.test().
Question 14: Which tool allows you to run a complete Postman Collection automatically from the command line (e.g., inside a CI/CD pipeline)?
- A. Postman CLI / Newman β (correct answer)
- B. cURL
- C. Wget
- D. Node.js native fetch
Explanation: Newman is Postman's open-source command-line collection runner. It allows you to integrate your Postman test suites directly into Jenkins, GitHub Actions, or GitLab CI.
Question 15: What is the "Collection Runner" in the Postman app?
- A. A tool to export code to Python
- B. A UI interface that executes all requests in a collection sequentially, running their tests and generating a report β (correct answer)
- C. A database crawler
- D. A performance profiler
Explanation: The Collection Runner lets you run multiple requests automatically in sequence. You can specify iterations, pass in CSV data files, and review test pass/fail rates.
Question 16: How do you view the exact raw HTTP request (headers and body) that Postman sent over the network?
- A. By checking the database
- B. By opening the "Postman Console" (bottom toolbar) β (correct answer)
- C. By viewing the "Tests" tab
- D. You cannot view it
Explanation: The Postman Console is a crucial debugging tool. It logs the raw network traffic, showing exactly what headers, params, and payload left the application, along with the raw response.
Question 17: If you need a variable to be accessible across *all* collections and *all* environments in your workspace, which variable scope should you use?
- A. Local variables
- B. Data variables
- C. Environment variables
- D. Global variables β (correct answer)
Explanation: Global variables have the broadest scope. They are accessible workspace-wide regardless of which specific environment is currently active.
Question 18: What does the "Code Snippet" (or </>) button do in Postman?
- A. Scans your API for security vulnerabilities
- B. Generates actual code (cURL, Python, JavaScript, PHP, etc.) for the current request configuration so you can paste it into your app β (correct answer)
- C. Compiles your backend code
- D. Formats JSON
Explanation: The Code Snippet feature is incredibly powerful for developers. Once you get an API call working in Postman, you can instantly export it as an Axios, fetch, or cURL script.
Question 19: How can you test an API endpoint with 100 different user inputs automatically in Postman?
- A. Run the Collection Runner and upload a CSV or JSON "Data file" containing the test records β (correct answer)
- B. Type them in manually 100 times
- C. Write a 100-line Pre-request script
- D. It is not possible
Explanation: Data-driven testing is supported in the Collection Runner. You upload a file, set the iteration count to match the rows, and Postman resolves variables from the file for each run.
Question 20: When writing a Postman Test to verify the response time is under 200ms, which assertion is correct?
- A.
pm.expect(pm.response.responseTime).to.be.below(200); β (correct answer)
- B.
assert(time < 200)
- C.
pm.test(time == 200)
- D.
expect.time < 200
Explanation: Postman uses the Chai Assertion Library syntax (expect). pm.response.responseTime provides the request duration in milliseconds.
Question 21: What does it mean to "Fork" a Postman collection?
- A. To delete it permanently
- B. To create a linked copy of a collection in a different workspace to propose changes (via Pull Request) without affecting the original β (correct answer)
- C. To split requests into multiple files
- D. To export it to JSON
Explanation: Similar to Git, forking allows collaboration. You can fork a public API collection, experiment with it, and merge changes back if you have permissions.
Question 22: What happens if you define a variable named url in both the Global scope and the Environment scope?
- A. The request fails due to conflict
- B. The Global variable overrides the Environment variable
- C. The Environment variable overrides the Global variable β (correct answer)
- D. They concatenate
Explanation: Postman resolves variables based on proximity scope. Local overrides Data, Data overrides Environment, and Environment overrides Global.
Question 23: If a POST request body requires form fields and a file upload (like an image), which Body type must be selected?
- A. raw
- B. binary
- C. GraphQL
- D. form-data β (correct answer)
Explanation: form-data simulates an HTML form (multipart/form-data). It provides key-value rows where the value type can be toggled from "Text" to "File" to upload documents.
Question 24: What is a Postman Workspace?
- A. A dedicated text editor
- B. A shared context area where teams can collaborate on APIs, Collections, Environments, and Mocks in real-time β (correct answer)
- C. A database table
- D. A server cluster
Explanation: Workspaces organize Postman elements. Personal workspaces are private, while Team workspaces allow multiple developers to sync and edit the same collections.
Question 25: Which tool in Postman visually structures an API schema (like OpenAPI or Swagger) and links it directly to collections and mock servers?
- A. The "APIs" tab β (correct answer)
- B. The "History" tab
- C. The "Environments" tab
- D. The Console
Explanation: The APIs tab supports API-first development. You can import an OpenAPI YAML file, and Postman will automatically generate collections and documentation for you.
Question 26: In a Postman test script, how do you parse the JSON body of the server's response into a JavaScript object?
- A.
const data = JSON.parse(response);
- B.
const data = pm.response.json(); β (correct answer)
- C.
const data = pm.body;
- D.
const data = getResponse();
Explanation: pm.response.json() is a built-in helper method that synchronously parses the JSON string returned by the server into a usable JavaScript object for testing.
Question 27: How can you chain API requests together (e.g., Request A creates an ID, Request B uses that ID) automatically in the Collection Runner?
- A. By running them manually in order
- B. By extracting the ID in Request A's Tests script, saving it to an environment variable, and referencing
{{id}} in Request B's URL β (correct answer)
- C. Postman does this automatically without scripts
- D. Using the Console
Explanation: This is the standard pattern for workflow testing. Request A saves state to the environment; Request B consumes that state.
Question 28: What is the purpose of the pm.sendRequest() function in a Pre-request script?
- A. To send an asynchronous HTTP request in the background *before* the main request executes (e.g., to fetch a fresh auth token) β (correct answer)
- B. To cancel the current request
- C. To send an email alert
- D. To download a file
Explanation: pm.sendRequest() allows complex setups where your script needs to call a secondary API to gather data or tokens required to execute the primary request.
Question 29: How do you force the Collection Runner to jump to a specific request instead of executing the next sequential one?
- A.
pm.jump("RequestName");
- B.
pm.execution.setNextRequest("RequestName"); β (correct answer)
- C.
postman.skipTo("RequestName");
- D. It is impossible to change execution order
Explanation: setNextRequest controls the execution flow inside the Collection Runner. It allows building conditional logic (like "If item doesn't exist, skip the Delete request").
Question 30: If your Postman request returns a 200 OK status but you suspect the response body is outdated due to server caching, which Postman setting can bypass this?
- A. Turn off the internet
- B. Ensure "Send no-cache header" is toggled ON in the request settings β (correct answer)
- C. Change the method to DELETE
- D. Close and reopen Postman
Explanation: Postman has built-in settings that automatically inject standard headers like Cache-Control: no-cache to ensure testing hits the server directly rather than a CDN proxy cache.