Explain how you would set up API test automation with Postman or a similar tool.
- postman
- API automation
- newman
Answer it first, then compare. Nothing here is saved or scored.
Model answer
Steps: (1) Organize requests into collections by feature. (2) Use environment variables for base URL, auth tokens, dynamic data. (3) Write test scripts (pm.test assertions) for status codes, response body, headers. (4) Chain requests using collection variables (save ID from POST, use in GET). (5) Use pre-request scripts for data generation. (6) Run with Newman in CI. (7) Set up monitors for scheduled health checks. For code-based approach: use Playwright API testing, supertest, or REST Assured for better version control and IDE support.
What interviewers listen for
- Schema-first thinkingYou validate response shape before you assert on values, every time.
- Status-code literacyYou can defend why 401 vs 403 vs 422 matters for the consumer.
- Contract awarenessYou know when consumer-driven contract tests beat end-to-end checks.
- Auth fluencyYou can describe rotating tokens across parallel workers without secrets in logs.