Postman interview questions — Medium
362 medium-level Postman questions from our API Testing bank, each with the correct answer and an explanation of why it is correct.
What this covers
Postman appears throughout API Testing interviews. At medium level, interviewers are typically checking that you have used it in practice: what you configured, what broke, and how you knew it worked. Work through these, then explain your answer out loud; the second part is what interviews actually test.
20 example questions
1. On a release readiness call: Which Postman variable scope is broadest (available everywhere)?
- A. Local.
- B. Environment.
- C. Global.correct
- D. Collection.
Why: Globals are broadest; precedence narrows local>data>environment>collection>global.
2. "Shared area where teams collaborate on APIs and collections" — in Postman, this describes which of the following?
- A. Global variables.
- B. Pm.sendRequest.
- C. Postman.setNextRequest.
- D. Workspace.correct
Why: workspace: Shared area where teams collaborate on APIs and collections.
3. "Controls execution order/branching in a collection run" — in Postman, this describes which of the following?
- A. Global variables.
- B. Pm.response.json().
- C. Pm.sendRequest.
- D. Postman.setNextRequest.correct
Why: postman.setNextRequest: Controls execution order/branching in a collection run.
4. "Parses the response body as JSON in a test script" — in Postman, this describes which of the following?
- A. Workspace.
- B. Pm.response.json().correct
- C. Pm.sendRequest.
- D. Example response.
Why: pm.response.json(): Parses the response body as JSON in a test script.
5. "Reads an environment variable in scripts" — in Postman, this describes which of the following?
- A. Pm.sendRequest.
- B. Pm.environment.get().correct
- C. Global variables.
- D. Pm.response.json().
Why: pm.environment.get(): Reads an environment variable in scripts.
6. "Executes all requests in a collection, optionally with data files" — in Postman, this describes which of the following?
- A. Postman.setNextRequest.
- B. Collection Runner.correct
- C. Workspace.
- D. Pm.environment.get().
Why: Collection Runner: Executes all requests in a collection, optionally with data files.
7. On a release readiness call: In Postman, where do assertions run after a response?
- A. Pre-request Script.
- B. Params.
- C. Tests tab.correct
- D. Headers.
Why: The Tests tab runs after the response; Pre-request runs before.
8. "Values available across all collections and environments" — in Postman, this describes which of the following?
- A. Authorization tab.
- B. Pm.environment.get().
- C. Global variables.correct
- D. Collection Runner.
Why: global variables: Values available across all collections and environments.
9. "Configures auth (Bearer, Basic, OAuth2) applied to requests" — in Postman, this describes which of the following?
- A. Pm.response.json().
- B. Pm.sendRequest.
- C. Authorization tab.correct
- D. Global variables.
Why: authorization tab: Configures auth (Bearer, Basic, OAuth2) applied to requests.
10. Which snippet correctly asserts a 200 status in a Postman Tests script?
- A. Pm.expect(200).
- B. Pm.test('status', () => pm.response.to.have.status(200)).correct
- C. Assert(response==200).
- D. Status.should.be(200).
Why: pm.test wraps an assertion; pm.response.to.have.status(200) checks the HTTP status code.
11. Which statement correctly describes Postman?
- A. Mock servers in Postman forward every request to the real API.
- B. The Collection Runner can only execute a single request once.
- C. Environment variables in Postman cannot be changed between environments.
- D. Postman Mock Servers return predefined responses based on saved examples.correct
Why: Mocks let front-end and test work proceed before the API is ready.
12. Which of the following statements about Postman is TRUE?
- A. Postman cannot import OpenAPI or Swagger specifications.
- B. Pre-request scripts execute after the response is received.
- C. Postman tests must be written in Python.
- D. Postman Mock Servers return predefined responses based on saved examples.correct
Why: Mocks let front-end and test work proceed before the API is ready.
13. On a release readiness call: Which asserts a 200 status in Postman?
- A. Pm.expect(200).
- B. Assert(200).
- C. Pm.response.to.have.status(200).correct
- D. Status.is(200).
Why: pm.response.to.have.status(200) checks the HTTP status.
14. Identify the accurate statement about Postman:
- A. Environment variables in Postman cannot be changed between environments.
- B. Postman cannot import OpenAPI or Swagger specifications.
- C. Pre-request scripts run JavaScript before a request is sent.correct
- D. Postman tests must be written in Python.
Why: Pre-request scripts commonly generate tokens or timestamps.
15. In a CI/CD pipeline review, consider this: Newman is:
- A. A mock server.
- B. The CLI runner for Postman collections.correct
- C. A schema validator only.
- D. A load GUI.
Why: Newman runs Postman collections from the command line (CI).
16. In the context of Postman, which of the following is a correct statement?
- A. Postman cannot import OpenAPI or Swagger specifications.
- B. Mock servers in Postman forward every request to the real API.
- C. Data files (CSV/JSON) drive the Collection Runner for data-driven testing.correct
- D. Pre-request scripts execute after the response is received.
Why: Each row/entry executes the collection iteration with different data.
17. Which Postman concept matches this description: "Executes all requests in a collection, optionally with data files"?
- A. Workspace.
- B. Postman.setNextRequest.
- C. Collection Runner.correct
- D. Global variables.
Why: Collection Runner: Executes all requests in a collection, optionally with data files.
18. In Postman, which of the following is described as: "Executes all requests in a collection, optionally with data files"?
- A. Authorization tab.
- B. Postman.setNextRequest.
- C. Collection Runner.correct
- D. Pm.environment.get().
Why: Collection Runner: Executes all requests in a collection, optionally with data files.
19. Which Postman concept matches this description: "Parses the response body as JSON in a test script"?
- A. Pm.environment.get().
- B. Global variables.
- C. Pm.response.json().correct
- D. Workspace.
Why: pm.response.json(): Parses the response body as JSON in a test script.
20. In Postman, which of the following is described as: "Values available across all collections and environments"?
- A. Postman.setNextRequest.
- B. Workspace.
- C. Global variables.correct
- D. Pm.sendRequest.
Why: global variables: Values available across all collections and environments.