Postman Interview Questions

Master your interview preparation with comprehensive Q&A covering all difficulty levels

📚

Why Postman Interviews Matter for API Testing

Postman has become the industry standard for API testing. API testing skills command a 20-30% salary premium and demonstrate expertise in REST APIs, automation, CI/CD integration, and modern QA practices.

Key Topics Interviewers Focus On:

  1. Core Concepts: HTTP methods, request/response structure, status codes, headers, and bodies
  2. Collections & Automation: Organizing requests, environments, pre-request/test scripts, and test suites
  3. Variables & Scripting: Variable scopes, dynamic generation, data extraction, and JavaScript logic
  4. Newman & CI/CD: Command-line execution, Jenkins/GitHub Actions integration, test reports
  5. Advanced Patterns: Data-driven testing, API chaining, mock servers, and contract testing
  6. Problem-Solving: Testing pagination, filtering, boundary conditions, JSON/XML validation

What Interviewers Want to Hear:

  1. Real-world Examples: Demonstrate API chaining, environment management, and automated test suites
  2. Automation Mindset: Show how you reduce manual testing through Newman and CI/CD integration
  3. Test Strategy: Explain comprehensive testing including happy paths, error codes, and edge cases
  4. Problem Decomposition: Walk through complex API testing scenarios with systematic approaches
  5. CI/CD Understanding: Show awareness of how API tests fit into deployment pipelines

Common Mistakes to Avoid:

  1. One-off Tool Usage: Always emphasize systematic automation and reusable test suites
  2. Ignoring Error Scenarios: Include negative testing, invalid inputs, and failure cases
  3. Hardcoding Values: Use environments and variables for different stages securely
  4. Weak Validation: Validate structure, data types, required fields, and business logic
  5. No Debugging Skills: Know how to check request/response details and trace issues
  6. Missing Test Data Strategy: Use data-driven testing and test isolation practices

Postman Interview Questions - Beginner Level

Q 1

What is Postman?

Postman is API client tool for testing and documenting APIs. Allows making requests, automating tests, monitoring APIs. Available as desktop app and web client.

Postmanclienttooltesting
Q 2

What are the main features of Postman?

Request builder, collections, environments, automated testing, API documentation, mocking, monitoring, collaboration tools.

Requestbuildercollectionsenvironments
Q 3

What is a request in Postman?

An HTTP request with method, URL, headers, body, parameters. Configure response validation, scripts, and tests.

HTTPrequestmethodheaders
Q 4

What are HTTP methods?

GET (retrieve), POST (create), PUT (update), PATCH (partial update), DELETE (remove), HEAD (like GET without body). Most common for API testing.

(retrieve)POST(create)(update)
Q 5

What is the difference between PUT and PATCH?

PUT replaces entire resource, PATCH partially updates resource. PATCH is more efficient for small updates.

replacesentireresourcePATCH
Q 6

What are headers in Postman?

Provide metadata for request: Content-Type, Authorization, Accept, User-Agent. Key-value pairs sent with request.

ProvidemetadatarequestContent-Type
Q 7

What is Content-Type header?

Specifies format of request body: application/json (JSON), application/x-www-form-urlencoded (form), text/plain (text).

Specifiesformatrequestbody
Q 8

What is Authorization header?

Provides authentication credentials: Bearer token, Basic auth (username:password encoded), API keys. Format: Authorization: Bearer <token>

ProvidesauthenticationcredentialsBearer
Q 9

What are query parameters?

Parameters appended to URL: /users?id=1&name=John. In Postman, add in Params tab.

Parametersappended/usersid=1&
Q 10

What is request body?

Data sent in request (POST, PUT, PATCH). Formats: JSON, XML, form-data, raw. In Postman, configure in Body tab.

Datasentrequest(POST
Q 11

What is a collection in Postman?

Folder containing related requests. Organize requests logically. Export/share collections.

Foldercontainingrelatedrequests
Q 12

What is an environment in Postman?

Set of variables for different contexts (dev, staging, production). Example: {{base_url}} replaced with environment value.

variablesdifferentcontexts(dev
Q 13

How do you use variables in Postman?

Reference with {{variable_name}}. Define in Global, Collection, or Environment scope. Example URL: {{base_url}}/users

Reference{{variable_name}}DefineGlobal
Q 14

What are pre-request scripts?

JavaScript code executed before request. Used for setup: generate tokens, set variables. Example: pm.environment.set("token", "abc123");

JavaScriptcodeexecutedbefore
Q 15

What are test scripts?

JavaScript code executed after request. Validate response. Example: pm.test("Status is 200", function() { pm.response.to.have.status(200); });

JavaScriptcodeexecutedafter
Q 16

What is the pm object in Postman?

Global object providing Postman API. Methods: pm.test(), pm.response, pm.request, pm.environment.set/get().

GlobalobjectprovidingPostman
Q 17

How do you validate response status code?

pm.test("Status is 200", function() { pm.response.to.have.status(200); });

test("Status200"function()response
Q 18

How do you validate response body?

pm.test("Body contains userId", function() { pm.expect(pm.response.text()).to.include("userId"); });

test("BodycontainsuserId"function()
Q 19

How do you parse JSON response?

const jsonData = pm.response.json(); Then access: jsonData.property or jsonData[0].property

constjsonDataresponsejson()
Q 20

How do you assert JSON properties?

pm.test("userId is 1", function() { pm.expect(pm.response.json().userId).to.equal(1); });

test("userIdfunction()expect(pmresponse
Q 21

What is response body in Postman?

Data returned by server. Displayed in Response panel. Can be JSON, XML, HTML, plain text.

DatareturnedserverDisplayed
Q 22

What is response status code?

HTTP status: 200 (OK), 201 (Created), 400 (Bad Request), 401 (Unauthorized), 404 (Not Found), 500 (Server Error).

HTTPstatus(OK)(Created)
Q 23

What is response headers?

Metadata returned by server: Content-Type, Set-Cookie, Cache-Control. View in Headers tab.

MetadatareturnedserverContent-Type
Q 24

What are status code ranges?

1xx Informational, 2xx Success, 3xx Redirection, 4xx Client Error, 5xx Server Error.

InformationalSuccessRedirectionClient
Q 25

What is Basic Authentication?

Username and password encoded in Base64. Authorization: Basic <base64(username:password)>. Set in Authorization tab: Type: Basic Auth.

UsernamepasswordencodedBase64
Q 26

What is Bearer Token Authentication?

Token sent in Authorization header. Authorization: Bearer <token>. Secure for APIs.

TokensentAuthorizationheader
Q 27

What is API key authentication?

Key sent as header or query parameter. Example: X-API-Key: abc123 or ?api_key=abc123

sentheaderqueryparameter
Q 28

What are cookies?

Small data stored on client. Sent automatically with requests. Manage in Cookies panel.

Smalldatastoredclient
Q 29

What is CORS and how does it affect Postman?

CORS controls cross-origin requests. Postman disables CORS locally (useful for testing). Enable "Disable CORS" if needed.

CORScontrolscross-originrequests
Q 30

What is SSL/TLS verification?

Verify SSL certificate authenticity. Can disable for testing: Settings -> SSL certificate verification toggle.

Verifycertificateauthenticitydisable
Q 31

What is the Runner in Postman?

Execute multiple requests in collection sequentially. Useful for test suites. Click Collection -> Run.

Executemultiplerequestscollection
Q 32

What is a data file in Postman?

CSV/JSON file containing test data. Runner iterates through rows. Useful for data-driven testing.

CSV/JSONfilecontainingtest
Q 33

What is iteration count in Runner?

Number of times to execute collection. Useful for load testing or running same tests multiple times.

Numbertimesexecutecollection
Q 34

How do you save responses in Postman?

Save response body as example: Response panel -> Save as example. Attach to request.

Saveresponsebodyexample
Q 35

What is mock server in Postman?

Simulate API behavior without real server. Configure examples for responses. Useful for frontend development.

Simulatebehaviorwithoutreal
Q 36

What is API documentation in Postman?

Generate documentation from collection. Include descriptions, examples, response codes. Share with team.

GeneratedocumentationcollectionInclude
Q 37

What is workspace in Postman?

Container for collections and environments. Organize work logically. Share workspace with team members.

ContainercollectionsenvironmentsOrganize
Q 38

How do you share collections?

Export: Collection -> Export -> JSON. Share file or link. Invite team members to shared workspace.

ExportCollectionExportJSON
Q 39

What is history in Postman?

Records recent requests. Access in History panel. Useful for revisiting requests.

RecordsrecentrequestsAccess
Q 40

What are assertions in Postman testing?

Verify response meets expectations: pm.expect(value).to.equal(expected). Assertions fail if not true.

Verifyresponsemeetsexpectations
Q 41

How do you check response time?

pm.test("Response time < 200ms", function() { pm.expect(pm.response.responseTime).to.be.below(200); });

test("Responsetime200ms"function()
Q 42

How do you check response size?

pm.response.responseSize; Useful for API performance testing.

responseresponseSizeUsefulperformance
Q 43

What is proxy in Postman?

Intercept requests/responses. Settings -> Proxy. Useful for debugging and monitoring traffic.

Interceptrequests/responsesSettingsProxy
Q 44

What is request filtering?

Filter requests in Runner results. Show/hide passed, failed, skipped tests.

FilterrequestsRunnerresults
Q 45

How do you handle timestamps?

Use pre-request script: pm.environment.set("timestamp", Date.now()); Reference in request: {{timestamp}}

pre-requestscriptenvironmentset("timestamp"
Q 46

How do you generate UUIDs?

Use pre-request script: pm.environment.set("uuid", pm.guid()); Reference: {{uuid}}

pre-requestscriptenvironmentset("uuid"
Q 47

What is form-data in Postman?

Multipart form data for file uploads. Body -> form-data. Add file type for file uploads.

Multipartformdatafile
Q 48

What is raw data in Postman?

Send raw JSON, XML, or text. Body -> raw. Specify content type: JSON, XML, Text.

SendJSONtextBody
Q 49

What is URL encoding?

Encode special characters in URL. Postman auto-encodes. Example: space becomes %20

EncodespecialcharactersPostman
Q 50

How do you use scripts for API chaining?

Store response data in variables: const id = pm.response.json().id; pm.environment.set("id", id); Use in next request: /users/{{id}}

Storeresponsedatavariables

Postman Interview Questions - Intermediate Level

Q 51

What are code snippets in Postman?

Generate code for requests. Supported languages: JavaScript, Python, cURL, Java. Useful for integration.

GeneratecoderequestsSupported
Q 52

What is Newman in Postman?

Command-line runner for Postman collections. Run tests in CI/CD: newman run collection.json

Command-linerunnerPostmancollections
Q 53

How do you integrate Postman with Jenkins?

Install Newman plugin or run via command line. Execute collection as build step. Generate reports.

InstallNewmanplugincommand
Q 54

What is conditional logic in Postman scripts?

Use if statements to control test flow: if (pm.response.code === 200) { ... }

statementscontroltestflow
Q 55

How do you set variables dynamically?

pm.environment.set("key", value) for environment. pm.globals.set("key", value) for global. pm.variables.set("key", value) for local.

environmentset("key"value)environment
Q 56

What is response schema validation?

Validate response structure against schema. Use ajv library in Postman for JSON schema validation.

Validateresponsestructureagainst
Q 57

How do you test array response?

Parse JSON: const arr = pm.response.json(); Test length: pm.expect(arr).to.be.an('array').that.is.not.empty

ParseJSONconstresponse
Q 58

How do you handle dynamic response data?

Parse response and use values. Extract values for next requests. Chain APIs based on response.

ParseresponsevaluesExtract
Q 59

What is request timeout in Postman?

Maximum time to wait for response. Settings -> Timeout in ms. Default: 0 (no timeout).

Maximumtimewaitresponse
Q 60

What is retry on connection error?

Automatically retry failed requests. Settings -> Automatically follow redirects toggle.

Automaticallyretryfailedrequests
Q 61

How do you test redirects?

By default, Postman follows redirects. Check response history: Response panel -> Timeline. Verify final URL.

defaultPostmanfollowsredirects
Q 62

What is response compression?

Gzip/Brotli compression. Postman auto-decompresses. Check Content-Encoding header.

Gzip/BrotlicompressionPostmanauto-decompresses
Q 63

How do you test XML responses?

Parse XML: const xmlToJson = pm.response.text(); Validate XML structure using regex or libraries.

ParseconstxmlToJsonresponse
Q 64

What is OAuth 2.0 in Postman?

Authorization type for OAuth APIs. Get tokens programmatically. Postman manages token refresh.

AuthorizationtypeOAuthAPIs
Q 65

What are environment variables priority?

Local > Env > Global. Local scoped variables have highest priority. Allows variable overriding.

LocalGlobalLocalscoped
Q 66

How do you export test results?

Runner shows results in console. Export as JSON or other formats using plugins.

Runnershowsresultsconsole
Q 67

What is collection monitor in Postman?

Schedule collection runs at intervals. Monitor API health, performance, uptime. Send notifications on failures.

Schedulecollectionrunsintervals
Q 68

What are request interceptors?

Modify requests before sending. Use pre-request scripts. Useful for adding auth headers, timestamps.

Modifyrequestsbeforesending
Q 69

What are response interceptors?

Process responses after receiving. Use test scripts. Validate, transform, log responses.

Processresponsesafterreceiving
Q 70

How do you debug requests in Postman?

Use console.log in scripts. View output in Console panel. Check request/response details.

consolescriptsViewoutput
Q 71

What are performance tests in Postman?

Measure response time, size. Compare performance across versions. Identify bottlenecks.

Measureresponsetimesize
Q 72

How do you test pagination?

Iterate through pages. In pre-request script, adjust page parameter. Validate items per page.

Iteratethroughpagespre-request
Q 73

How do you test sorting?

Request with sort parameter: /items?sort=name. Validate response order. Compare consecutive items.

Requestsortparameter/items
Q 74

How do you test filtering?

Request with filter parameter: /items?filter=active. Validate only filtered items in response.

Requestfilterparameter/items
Q 75

What is boundary testing?

Test API with edge cases: null, empty, max values. Ensure proper error handling.

Testedgecasesnull
Q 76

What is negative testing?

Test with invalid data. Expected failures: 400, 401, 404, 422. Verify error messages.

TestinvaliddataExpected
Q 77

How do you test API rate limiting?

Send multiple requests rapidly. Check response headers: X-Rate-Limit, Retry-After. Verify 429 status.

Sendmultiplerequestsrapidly
Q 78

How do you test concurrent requests?

Run multiple requests simultaneously. Runner with high iteration count. Monitor for race conditions.

multiplerequestssimultaneouslyRunner
Q 79

What is test report generation?

Newman generates HTML reports. Use --reporters html. Share test results with team.

NewmangeneratesHTMLreports
Q 80

How do you version Postman collections?

Export versions with timestamps. Use git for version control. Track API changes over time.

Exportversionstimestampsversion
Q 81

What is global variables in Postman?

Variables available across workspaces. Set in Manage Environments -> Globals tab. Use: {{variable}}

Variablesavailableacrossworkspaces
Q 82

How do you disable SSL verification safely?

Settings -> SSL certificate verification toggle. Use only for testing. Never in production.

Settingscertificateverificationtoggle
Q 83

What is postman_token?

Auto-generated token for requests. Used to prevent CSRF attacks. Can be disabled.

Auto-generatedtokenrequestsprevent
Q 84

How do you handle large response bodies?

Postman limits response preview size. Download full response. Use filters in Console.

Postmanlimitsresponsepreview
Q 85

What is API documentation generation?

Postman generates documentation from collection. Include descriptions and examples. Publish to public link.

Postmangeneratesdocumentationcollection
Q 86

How do you create API mock examples?

Save response as example after sending request. Attach to request. Mock server uses examples.

Saveresponseexampleafter
Q 87

What is request duplication in collections?

Duplicate request to create variations. Test different parameters/headers without recreating.

Duplicaterequestcreatevariations
Q 88

How do you test multipart form data?

Body -> form-data. Add files and fields. Postman handles encoding automatically.

Bodyform-datafilesfields
Q 89

What is API contract testing?

Verify API conforms to contract/schema. Test request/response structure. Detect breaking changes.

Verifyconformscontract/schemaTest
Q 90

How do you test API versioning?

Test different API versions: /v1/users, /v2/users. Ensure backward compatibility.

Testdifferentversions/v1/users
Q 91

What is request templating?

Use {{variable}} syntax in requests. Variables replaced during execution. Supports environment variables.

{{variable}}syntaxrequestsVariables
Q 92

How do you send requests with different content types?

Headers -> Content-Type. Postman auto-sets for JSON, form-data. Manual for custom types.

HeadersContent-TypePostmanauto-sets
Q 93

What is custom domains in Postman?

Use custom domain for requests. Useful for testing in different environments: dev, staging, prod.

customdomainrequestsUseful
Q 94

How do you handle authentication tokens with expiry?

Pre-request script refreshes token before request: fetch token, store in environment, use in request.

Pre-requestscriptrefreshestoken
Q 95

What is API testing best practices?

Test all endpoints, use data-driven testing, verify error responses, test edge cases, automate, document.

Testendpointsdata-driventesting
Q 96

How do you test WebSocket APIs?

Postman supports WebSocket in newer versions. Send/receive messages. Test real-time communication.

PostmansupportsWebSocketnewer
Q 97

What is GraphQL testing in Postman?

Send GraphQL queries in request body. POST to GraphQL endpoint. Validate JSON response.

SendGraphQLqueriesrequest
Q 98

How do you test gRPC APIs?

Postman supports gRPC (experimental). Test service definitions. Validate messages.

PostmansupportsgRPC(experimental)
Q 99

What is API monitoring in Postman?

Schedule collection runs periodically. Monitor uptime, performance. Send alerts on failures.

Schedulecollectionrunsperiodically
Q 100

How do you implement regression testing?

Maintain baseline test results. Compare new runs with baseline. Detect regressions in API behavior.

Maintainbaselinetestresults

Postman Interview Questions - Advanced Level

101-150. Advanced Topics (abbreviated)

101-110: Advanced scripting (Postman sandbox API), custom libraries, helpers and utilities. 111-120: Performance optimization, load testing with Newman, CI/CD integration (Jenkins, GitHub Actions, GitLab CI), Docker integration. 121-130: Security testing (API security, OAuth flows, JWT validation), OWASP testing, penetration testing with Postman. 131-140: Advanced mock servers, contract testing, Postman API for automation, webhooks and integrations. 141-150: Database testing (connecting to databases from Postman), API monitoring dashboards, team collaboration, enterprise features, API gateway testing.