Postman
Postman is a tool for sending requests to an API, inspecting the server’s replies, and checking that they match expectations without going through the app’s interface.
Also known as: Insomnia
What Postman is for
Suppose a store’s product page shows the wrong price. Before changing the page, you can use Postman to request the product directly from the API and see which price the server returns. If the API returns the correct price, look at how the page handles the data. If it returns the wrong price, you can investigate the API without involving the page. Insomnia is a separate API client that serves a similar purpose, not another name for Postman.
From a request to a repeatable test
Start with an HTTP method and a URL. Add query parameters, headers, credentials, or a request body as the endpoint requires. When you click Send, Postman displays the response status, headers, body, and elapsed time. You can inspect these manually or write JavaScript assertions that run after the response arrives.
Save related requests in a collection so you can rerun them or share them with a teammate. Environments let the same request work against different deployments: {{baseUrl}} can point to a local server in one environment and a staging server in another. Keep real tokens and passwords out of shared collections and exported files. The Collection Runner runs saved requests together; Postman CLI can run collection checks as part of CI.
Example: checking a product lookup
Send GET {{baseUrl}}/products/42. Assume the API contract says this request returns 200 OK and a JSON object with the numeric ID 42. In Scripts → Post-response, add:
pm.test('Returns HTTP 200', () => {
pm.response.to.have.status(200);
});
pm.test('Returns product 42', () => {
pm.expect(pm.response.json().id).to.eql(42);
});
Checking the ID catches a bug that a status check misses: the server might successfully return the wrong product. For a missing-product test, use a product ID known to be absent in that environment and assert the error status and response format defined by the contract.
Common misconceptions
An API test does not tell you whether the page renders the result correctly. A request that succeeds in the Postman desktop app may still fail in the browser because of CORS. And the elapsed time for one request is useful when debugging, but it does not tell you how the service behaves under concurrent traffic.
How it comes up in interviews
A QA interviewer might give you endpoint documentation and ask you to build a request and describe the checks you would add. Explain what test data you need, which parts of the response matter, and how you would reproduce the result on a different environment. A good answer ties each assertion to a documented expectation rather than simply checking for a success status.