Skip to content
TryHired.
Interview prep · Technical · checked against the official docs

Postman interview questions: answers checked against the docs

The API testing questions QA and developer roles get about Postman, answered in plain words and checked against the Postman documentation.

Updated Nov 16, 2026 · Facts checked against the official documentation · questions: TryHired
Quick answer

Postman interviews cover collections, variables and their scopes, environments, pre-request and post-response scripts, writing tests with pm.test and pm.expect, chaining requests, data-driven runs, running collections in CI with the Postman CLI or Newman, mock servers and monitors, and authentication. Below are 11 questions; each answer lists the Postman documentation pages it was checked against.

Basic

Basic Postman interview questions

Advice

Basic1. What is Postman used for in API testing?

Postman lets you build and send HTTP requests, inspect responses, and save requests in collections that can be run as test suites, by hand, on a schedule or in CI. Testers use it for exploratory API testing, automated checks on status codes and response bodies, and sharing request examples with developers.

Checked against: Postman docs: Collection Runner

Basic2. What are variables and their scopes in Postman?

Variables hold values such as base URLs, tokens and IDs, so requests do not repeat them. From broadest to narrowest, the scopes are global, collection, environment, data (from a data file during a run) and local (set in a script for one run). When two scopes define the same name, the narrowest wins.

JavaScript (Postman script) snippet · illustrative, not run on this page
pm.environment.set("jobId", pm.response.json().id);
const baseUrl = pm.collectionVariables.get("baseUrl");

Checked against: Postman docs: variables

Basic3. What is an environment, and why use one?

An environment is a named set of variables, for example dev, staging and production, each with its own base URL and credentials. You switch environments to run the same requests against a different system without editing them. Keep secrets out of shared environments where possible.

Checked against: Postman docs: environments

Intermediate

Intermediate Postman interview questions

Advice

Intermediate4. What are pre-request and post-response scripts?

Both are JavaScript that runs in Postman's sandbox. A pre-request script runs before the request is sent, for example to build a timestamp, sign a request or fetch a token. A post-response script runs after the response arrives; that is where tests and assertions go, and where you save values, such as a new ID, for the next request.

JavaScript (Postman script) snippet · illustrative, not run on this page
// pre-request: create a unique email for this run
pm.variables.set("email", `test+${Date.now()}@example.com`);

Checked against: Postman docs: scripts

Intermediate5. How do you write a test in Postman?

Wrap each check in pm.test with a descriptive name and assert with pm.expect, which uses Chai's BDD syntax. Test the status code, important headers, the response body's structure and values, and, where it matters, the response time. Keep each test focused so a failure points to one problem.

JavaScript (Postman script) snippet · illustrative, not run on this page
pm.test("returns 201 with the new job", function () {
    pm.response.to.have.status(201);
    const body = pm.response.json();
    pm.expect(body).to.have.property("id");
    pm.expect(body.title).to.eql(pm.variables.get("title"));
});

Checked against: Postman docs: test scripts

Intermediate6. How do you chain requests, for example create a record and then fetch it?

Save a value from one response into a variable in its post-response script, then reference it as {{variable}} in the next request's URL, headers or body. Run the requests in order with the Collection Runner. Do not depend on data left over from earlier runs; create what each test needs.

JavaScript (Postman script) snippet · illustrative, not run on this page
// post-response script of "Create job"
pm.collectionVariables.set("jobId", pm.response.json().id);
// the next request's URL: {{baseUrl}}/jobs/{{jobId}}

Checked against: Postman docs: Collection Runner, Postman docs: scripts

Intermediate7. What is data-driven testing in Postman?

Running the same requests once per row of a CSV or JSON data file, where each column becomes a data-scope variable. It is useful for validation rules, boundary values and many user types. In the current Postman docs, custom data files in collection runs are available on paid plans.

Checked against: Postman docs: data files

Advanced

Advanced Postman interview questions

Advice

Advanced8. How do you run Postman tests in a CI pipeline?

Use a command-line runner. The Postman CLI is Postman's official command-line tool for running collections and more in CI/CD. Newman is the older open-source runner for exported collections in the v2.1 JSON format, and many existing pipelines still use it; the current docs point Newman users to the Postman CLI. Fail the pipeline when tests fail.

Shell snippet · illustrative, not run on this page
newman run jobs-api.postman_collection.json -e staging.postman_environment.json --reporters cli,junit

Checked against: Postman docs: Postman CLI, Postman docs: Newman

Advanced9. What are mock servers and monitors?

A mock server returns example responses so front-end developers and testers can work before the real API exists, or test edge cases that are hard to trigger. A monitor runs a collection on a schedule to check that a deployed API keeps working and stays fast.

Checked against: Postman docs: mock APIs, Postman docs: monitors

Advanced10. How do you handle authentication in Postman?

Set the auth type (Bearer token, Basic, API key, OAuth 2.0 and others) on the collection or folder and let requests inherit it, so the token lives in one place. For short-lived tokens, a pre-request script can fetch a fresh token when needed. Store secrets in variables marked as secret or in a vault, and keep them out of exported files you share.

Checked against: Postman docs: authorization

Advanced11. What should a good API test suite in Postman cover?

The success path and the error paths: valid requests, missing or invalid fields (400), missing or wrong credentials (401 and 403), missing resources (404), plus schema checks on the response body. Make each run create its own data, use a separate environment for each stage, and run the suite in CI on every change.

Checked against: Postman docs: Collection Runner, Postman docs: test scripts

Practice

How to practice with this page

Advice
  • Build a collection for a public API with tests for success and error cases.
  • Chain two requests by saving an ID in a variable.
  • Run the collection from the command line and read the report.
  • Explain when you would move API tests from Postman into code.
Next

Related interview prep and tools

Disclosure: TryHired makes HIRED, a paid job-search program, so we have a conflict of interest when we mention it. This question bank is free, with no TryHired signup.

FAQ

Questions people ask

What Postman topics come up often in QA interviews?
Variables and scopes, environments, pre-request and post-response scripts, writing tests with pm.test and pm.expect, chaining requests, the Collection Runner and data files, running collections in CI, mocks and monitors, and authentication.
Is Postman enough for API automation?
For many teams it covers functional API checks, especially with CI runs. Larger suites are often written in code instead (REST Assured, pytest with requests, Playwright's API testing) for version control, reuse and integration with other tests. Know the trade-offs.
Were these scripts run?
No. Postman is not run on the build machine, so the scripts and commands are illustrations and no output is shown. Variable names and file names are examples.
Method

How this page is built

TryHired wrote these questions and answers. Statements about the technology were checked against the official documentation pages listed below, saved when the page was built (2026-11-16). The code snippets are short illustrations and were not run on this page. The question list is general practice: it does not predict what a particular employer will ask.

What this page can't tell you
  • Interviewers ask different questions for different roles and levels.
  • Answers are short explanations, not complete references.
  • No Postman run was made. The answers follow the Postman documentation for the current version (v12) at read time; plans and features change, as the data-file answer notes.
Sources
  1. Postman docs: authorization (read 2026-11-15)
  2. Postman docs: Postman CLI (read 2026-11-15)
  3. Postman docs: data files (read 2026-11-15)
  4. Postman docs: environments (read 2026-11-15)
  5. Postman docs: mock APIs (read 2026-11-15)
  6. Postman docs: monitors (read 2026-11-15)
  7. Postman docs: Newman (read 2026-11-15)
  8. Postman docs: Collection Runner (read 2026-11-15)
  9. Postman docs: scripts (read 2026-11-15)
  10. Postman docs: test scripts (read 2026-11-15)
  11. Postman docs: variables (read 2026-11-15)