25 Postman Interview Questions for API Testers
Fresher to experienced Postman questions on collections, variables, scripting, Newman and CI, with short model answers and code.
Most API testing interviews in India now include a Postman round, even for roles that mainly use Rest Assured or Playwright. The reason is practical: Postman is where testers explore an API before automating it, and how you use it reveals whether you understand requests, variables, scripting and CI or have only clicked Send. These Postman interview questions are the ones that come up again and again, from fresher screenings to experienced rounds.
Each answer is short enough to say aloud in an interview and includes code where the interviewer is likely to ask for it. The questions are grouped by level, so freshers can focus on the first two sections and experienced testers can jump to scripting, Newman and scenarios.
Key takeaways
- Know the difference between collections, environments and the five variable scopes, and which scope wins.
- Be ready to write
pm.testassertions for status, body, headers and response time from memory. - Explain token chaining between requests clearly; it is asked in almost every round.
- Understand how Newman runs collections from the command line and in CI pipelines.
- Back each answer with a small example from a project, even a practice one.
Postman interview questions for freshers (1-8)
1. What is Postman and why do testers use it?
Postman is an API platform used to design, send, test and document HTTP requests. Testers use it to explore endpoints, check responses manually, write test scripts in JavaScript, organise requests into collections and run them repeatedly, including in CI through Newman.
2. What is a collection?
A collection is a group of saved requests, usually organised into folders by module or feature. Collections can hold their own variables, scripts and documentation, and can be run as a suite using the Collection Runner or Newman.
3. What HTTP methods have you tested in Postman?
GET to read data, POST to create, PUT to replace, PATCH to partially update and DELETE to remove a resource. In an interview, add which status codes you expected for each, for example 201 for a successful POST that creates a resource.
4. What is the difference between query parameters and path variables?
Path variables identify a specific resource and are part of the URL path, like /users/:id. Query parameters filter or modify the result and come after a question mark, like /users?status=active&page=2. Postman has separate tabs for both.
5. How do you send a JSON body in a POST request?
Choose Body, select raw and set the type to JSON. Postman then adds the Content-Type: application/json header automatically. For file uploads, use form-data instead.
6. What authorisation types does Postman support?
Common ones include No Auth, API Key, Bearer Token, Basic Auth and OAuth 2.0. You can set auth at the collection or folder level and let requests inherit it, which avoids repeating the token in every request.
7. What is an environment in Postman?
An environment is a named set of variables, such as baseUrl, username and token, for one deployment like QA, staging or production. Switching the environment lets you run the same collection against different servers without editing requests.
8. What is the difference between environment and global variables?
Global variables are available across the whole workspace regardless of the selected environment. Environment variables are only active when that environment is selected. Teams generally prefer environment or collection variables because globals become hard to manage.
Variables and scripting questions (9-17)
9. Explain variable scopes and their precedence.
Postman has global, collection, environment, data and local variables. When the same name exists in several scopes, the narrowest one wins: local overrides data, data overrides environment, environment overrides collection, and collection overrides global.
10. What are pre-request scripts and post-response scripts?
Pre-request scripts run before the request is sent, often to generate data or set headers. Post-response scripts (shown under the Tests or Scripts tab depending on the version) run after the response arrives and usually contain assertions and variable extraction.
11. Write basic tests for status code, response time and body.
pm.test("Status code is 200", function () {
pm.response.to.have.status(200);
});
pm.test("Response time is below 800 ms", function () {
pm.expect(pm.response.responseTime).to.be.below(800);
});
pm.test("User has a numeric id and expected email", function () {
const body = pm.response.json();
pm.expect(body.id).to.be.a("number");
pm.expect(body.email).to.eql(pm.environment.get("userEmail"));
});Postman uses Chai-style assertions through pm.expect.
12. How do you pass a token from the login response to other requests?
Extract it in the login request’s post-response script and store it in a variable:
const body = pm.response.json();
pm.collectionVariables.set("authToken", body.token);Then set the Authorization header in later requests (or at collection level) to Bearer {{authToken}}. This is called request chaining.
13. How do you check a response header?
pm.test("Content-Type is JSON", function () {
pm.response.to.have.header("Content-Type");
pm.expect(pm.response.headers.get("Content-Type")).to.include("application/json");
});14. How do you validate a JSON schema in Postman?
Define a schema object and use the built-in assertion:
const schema = {
type: "object",
required: ["id", "name", "price"],
properties: {
id: { type: "number" },
name: { type: "string" },
price: { type: "number" }
}
};
pm.test("Product matches schema", function () {
pm.response.to.have.jsonSchema(schema);
});Schema checks catch type changes and missing fields that a simple value check would miss.
15. What are dynamic variables?
Built-in placeholders that generate values at runtime, such as {{$guid}}, {{$timestamp}}, {{$randomEmail}} and {{$randomInt}}. They help create unique test data, for example a new user email for every registration test.
16. How do you generate test data in a pre-request script?
const email = "qa_user_" + Date.now() + "@example.com";
pm.variables.set("newUserEmail", email);The request body can then use {{newUserEmail}}. Using a local variable keeps it from polluting the environment.
17. What is pm.sendRequest used for?
It sends an extra HTTP request from inside a script, for example to fetch a fresh token before the main request:
pm.sendRequest({
url: pm.environment.get("baseUrl") + "/auth/login",
method: "POST",
header: { "Content-Type": "application/json" },
body: {
mode: "raw",
raw: JSON.stringify({
username: pm.environment.get("username"),
password: pm.environment.get("password")
})
}
}, function (err, res) {
if (err) {
console.log(err);
return;
}
pm.environment.set("authToken", res.json().token);
});Keep credentials in environment variables (marked as secret where possible) and never commit real secrets into exported collections.
Collection Runner, Newman and CI questions (18-22)
18. What is the Collection Runner?
The Collection Runner executes all requests in a collection or folder in order, with options for iterations, delay between requests and data files. It shows a pass and fail summary for every test.
19. How do you do data-driven testing in Postman?
Prepare a CSV or JSON data file where each row is one iteration. Reference columns as variables, like {{username}}, or read them in scripts with pm.iterationData.get("username"). Then select the file in the Collection Runner or pass it to Newman with -d.
20. What is Newman?
Newman is Postman’s command-line collection runner, distributed as an npm package. It lets you run exported collections from a terminal or CI pipeline:
npm install -g newman
newman run Orders.postman_collection.json \
-e qa.postman_environment.json \
-d testdata.csv \
-r cli,junit --reporter-junit-export results/newman.xmlThe JUnit XML report can be published by Jenkins, GitHub Actions or Azure DevOps.
21. How do you integrate Postman tests with Jenkins?
Install Node.js and Newman on the agent, export the collection and environment (or fetch them through the Postman API), run Newman in a pipeline stage and publish the JUnit report. A non-zero exit code from Newman fails the build when tests fail.
22. How do you control the order of requests in a run?
By default requests run in the order they appear. You can change the next request from a script with postman.setNextRequest("Request name") (newer versions also offer pm.execution.setNextRequest()), and stop the run by passing null. Use this sparingly, because complex jumps make collections hard to maintain.
Experienced and scenario-based questions (23-25)
23. Your collection passes locally but fails in CI. How do you debug it?
Check the environment file used in CI, especially baseUrl and secrets. Confirm that variables set in one request are not relying on values that only exist in your local globals. Look at Newman’s CLI output for the exact failing assertion, run with --verbose for request details, and check network access from the CI agent to the API.
24. How do you test negative scenarios in Postman?
Duplicate the request and change one thing at a time: missing mandatory field, wrong data type, invalid token, expired token, unsupported method and boundary values. Assert both the status code (400, 401, 403, 404, 405, 422 depending on the API’s contract) and the error message structure.
25. When would you move from Postman to code-based API automation?
Postman is excellent for exploration, quick regression and contract checks. Teams often move to Rest Assured, Playwright API testing or similar code frameworks when they need complex data setup, database validation, reuse across UI and API tests, or tighter integration with an existing framework and code review process. Many teams keep both. See our Rest Assured tutorial for how the same checks look in Java.
How to prepare for Postman interview questions
A short preparation plan that works:
- Pick a free public practice API and build a collection with at least ten requests across GET, POST, PUT and DELETE.
- Add an environment with
baseUrland a token, and chain the login response into later requests. - Write tests for status, schema, headers and one business rule per request.
- Run it with a CSV data file in the Collection Runner, then with Newman from the terminal.
- Push the exported collection to GitHub and mention it on your resume.
If you are new to the tool, start with our Postman API testing tutorial and the API fundamentals guide. The official Postman site links to the learning centre and documentation for the latest features.
Quick revision table
| Topic | Remember |
|---|---|
| Variable precedence | Local > Data > Environment > Collection > Global |
| Assertion style | pm.test with pm.expect (Chai BDD) |
| Token chaining | Extract in post-response script, store in variable |
| Data-driven | CSV or JSON file, pm.iterationData |
| CLI runner | Newman with reporters such as cli and junit |
| Request order | postman.setNextRequest |
🚀 Hunting for API testing jobs?
QA Jobs India shares 100+ fresh QA & software testing openings every morning — manual, automation, API and remote roles.
See today’s QA jobs →Practise next (same interview round)
- API testing interview questions for freshers – 30 Q&A (status codes, REST basics, negative tests)
- The 4-step formula for “How would you test…?” questions
- Jira and JQL questions for testers
- HR email templates to apply for API testing roles
Ready to apply? Today’s free QA jobs (new at 9 AM IST) · free account · every opening with HR contacts: 3 days for ₹55, ends on its own.
FAQs
Are Postman interview questions asked for automation roles?
Yes. Even teams that automate with Rest Assured or Playwright often ask Postman questions because it shows how you explore and debug APIs. Expect at least a few questions on variables, scripting and Newman.
Do I need JavaScript to answer Postman scripting questions?
Basic JavaScript is enough: variables, objects, functions, JSON.parse and simple conditions. You should be comfortable writing pm.test blocks and extracting values from a JSON response without looking them up.
What is the difference between Postman and Newman?
Postman is the desktop and web application where you build and run requests interactively. Newman is a command-line runner that executes exported collections, which makes it suitable for CI pipelines.
Is Postman enough for an API testing job?
For many manual and junior API testing roles it is a strong start. For automation roles, combine it with one code-based tool and good HTTP fundamentals. Our API testing interview questions and Rest Assured interview questions cover the next level.
Conclusion
Interviewers are not looking for someone who has memorised every Postman menu. They want testers who can chain requests, write meaningful assertions and run a collection in CI. Build one complete practice collection this week, run it through Newman, and rehearse these Postman interview questions aloud using that project as your example.
- 100+ fresh QA jobs daily + Direct HR email IDsLive every morning at 9 AM — apply straight to HR
- Weekly Mega Job Fair800+ QA jobs from India & around the world, every week
- Certified QA coursesUp to 3 courses included · all 17 for ₹500
- AI ATS Resume BuilderFree resume points included
- Full LinkedQA feedEvery post, fully unblurred
- Complete QA Material libraryInterview Q&A, cheat sheets, templates & roadmaps
Instant activation right after payment · One login for jobs, courses, resume & LinkedQA
💎 Get every QA opening, every day
Join QA Jobs India Premium for 100+ verified QA jobs daily with HR contact details.
QA Jobs Hub
Every QA job opening, company profile and career guide on QA Jobs India — India & Global, in one place.