Stop 08 · API TestingTopics · 3/9

Postman Fundamentals

Part of the QA Testing Roadmap

In short

Postman is where most testers first poke at an API: build a request, hit Send, read the reply. Then you save it, add checks, and suddenly you have a test suite.

The standard tool for manually testing and exploring APIs — sending requests, inspecting responses, and organizing requests into collections for repeatable testing.

The purple blob seals an envelope at a desk with a tray of sorted letter folders.

Think of it like this

A neat letter desk

You write a letter, send it, and file the reply. Over time you keep a tray of templates: 'complaint', 'refund', 'address change'. Postman is that desk: saved requests in folders, ready to resend with one click.

Watch it happen

From one request to a suite

Request
Collection
Environment
Tests
Runner

1/5Pick a method, type a URL, add headers or a JSON body, and press Send.

The big ideas

What you need to know

Variables

Write {{baseUrl}}/users instead of the full URL. Change the environment, not every request.

Test scripts

Small JavaScript checks using pm.test and pm.expect run after each response.

Chain requests

Save a token or new id from one response and reuse it in the next request.

Run outside the app

Newman and the Postman CLI run collections from a terminal or a CI pipeline.

See it in code

Walk through the code

js
1pm.test("status is 200", function () {2  pm.response.to.have.status(200);3});4 5pm.test("post has the right shape", function () {6  const body = pm.response.json();7  pm.expect(body.id).to.eql(1);8  pm.expect(body.title).to.be.a("string");9});10 11pm.test("responds within 1 second", function () {12  pm.expect(pm.response.responseTime).to.be.below(1000);13});14 15pm.environment.set("postTitle", pm.response.json().title);

1/4The simplest check: the status code is what you expect.

Paste into the Tests (post-response script) tab of a GET {{baseUrl}}/posts/1 request.

Save yourself the pain

Common mistakes

Oops

Pasting real tokens into requests and sharing the collection publicly.

Do this instead

Keep secrets in environment variables marked secret, and never export them with the collection.

Oops

Using Postman only to click Send, with no saved tests.

Do this instead

Add at least a status and a body check to every saved request.

Your mission

Your first collection

~35 min

Quick check

Why put baseUrl in an environment instead of typing the full URL in each request?

Go deeper

  1. 1Set up Postman and send a request to a free public API.
  2. 2Practice organizing related requests into a Postman collection.
  3. 3Learn to use Postman's built-in test scripting for basic response assertions.

More topics at this stop

Stuck on this topic? Ask an Insider

Get 1:1 guidance from people who've walked this exact path — on the InsideEdge app.

Download
InsideEdge