Skip to content
SDETRole
SDETRole

Interview questions / API

Postman Interview Questions

Postman questions cover collections, environments, scripting with pm.* and running collections in CI with Newman or the Postman CLI.

4 questions · 2 beginner· 2 intermediate

beginner questions

intermediate questions

What Postman interviews assess

Most testers have sent a request in Postman. Interviews check whether you can turn a collection into a maintainable test suite: tests written with pm.test and pm.expect, values passed between requests, configuration kept in environments rather than hard-coded, and the collection running unattended in CI. For senior roles, expect to discuss where Postman stops being the right tool and a code-based framework such as REST Assured or Playwright's API testing takes over.

Concepts to study first

  • Test scripts and request chaining: parse the response with pm.response.json(), assert on status and fields, then store an id or token with pm.collectionVariables.set for the next request.
  • Variable scopes and environments: global, collection, environment, data and local scopes, and which one wins when the same name exists in several. Secrets belong in environment values that are not shared, not in the collection.
  • Data-driven collection runs: feed a CSV or JSON file to the Collection Runner and read each row with pm.iterationData.
  • Newman and the Postman CLI in CI: run the exported collection with an environment file, fail the build on test failures, and publish a report.

A worked example

Asked to "test the login endpoint and use the token in the next request", a complete answer covers both requests. In the login request's tests: pm.test('returns a token', () => { pm.response.to.have.status(200); const body = pm.response.json(); pm.expect(body.token).to.be.a('string'); pm.collectionVariables.set('token', body.token); });. The next request sends Authorization: Bearer {{token}}. Then add the negative cases an interviewer will ask about: wrong password, missing fields and an expired token.

When Postman is not the right tool

A thoughtful senior answer acknowledges trade-offs. Postman is excellent for exploration, sharing requests across a team and quick regression collections. Large suites become harder to review because scripts live inside JSON collection files, refactoring shared logic is awkward, and complex test data setup is easier in a programming language. Many teams therefore explore in Postman and automate critical API tests in code, with REST Assured in Java or Playwright's request fixture in TypeScript, running them in the same pipeline as the rest of the suite.

If you are asked to compare the options, mention version control, code review and how easily failures can be debugged. The REST Assured interview questions cover the code-based side.

How to practise

The practice API behind the API testing playground supports CORS, so you can import its requests into Postman: log in, chain the token into /auth/me, and test validation and pagination responses. The Postman basics lesson walks through collections, environments and scripts, and the API testing interview questions cover the HTTP knowledge Postman questions assume.

Type to search across SDETRole.

Full-text search by Pagefind · runs in your browser Open search page →