0% found this document useful (0 votes)
6 views2 pages

Postman API Testing Guide

Postman is a widely used tool for API development and testing, offering a user-friendly interface for sending requests and automating workflows. It supports various API types, allows for easy request building, and includes features like reusable collections and environment variables. The guide covers making API calls, managing parameters, setting headers, verifying response statuses, and understanding response headers for effective API testing.

Uploaded by

ss.swastik.ss
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views2 pages

Postman API Testing Guide

Postman is a widely used tool for API development and testing, offering a user-friendly interface for sending requests and automating workflows. It supports various API types, allows for easy request building, and includes features like reusable collections and environment variables. The guide covers making API calls, managing parameters, setting headers, verifying response statuses, and understanding response headers for effective API testing.

Uploaded by

ss.swastik.ss
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

■ Postman for API Testing – Study Guide

Mastering Postman
Postman is one of the most popular tools for API development, testing, and automation. It
provides a user-friendly interface to send requests, inspect responses, organize collections,
and even automate workflows.

Introduction to Postman
What is Postman?
- A platform to test REST, SOAP, and GraphQL APIs.
- Provides GUI for sending API requests.

Why use it?


- Easy request building.
- Reusable collections.
- Environment variables.
- Automation and testing.

Making API Calls


Steps:
1. Open Postman → Click New Request.
2. Select the HTTP method (GET, POST, PUT, DELETE, PATCH).
3. Enter the API endpoint (URL).
4. Click Send.

Example:
GET request: [Link]

Managing Path and Query Parameters


Path Parameters:
/users/{id}, e.g., /users/101

Query Parameters:
/users?id=101&status;=active

In Postman:
- Path parameters entered in URL (/users/{{userId}}).
- Query parameters added in Params tab.

Setting Headers and Passing Payloads


Headers:
- Content-Type: application/json
- Authorization: Bearer

Payloads (Body Data):


In POST/PUT → Body → raw → JSON.
Example:
{
'name': 'Swastik',
'role': 'Tester'
}

Response Status Codes and Message Verification


Common Status Codes:
- 200 OK → Successful
- 201 Created → Resource created
- 400 Bad Request → Invalid input
- 401 Unauthorized → Authentication required
- 404 Not Found → Resource missing
- 500 Internal Server Error

In Postman Tests tab:


[Link]('Status code is 200', function () {
[Link](200);
});

Understanding Response Headers


Response headers provide info about server, content, caching.
Examples:
- Content-Type: application/json
- Date: Tue, 15 Aug 2025 10:00:00 GMT
- Server: nginx

Useful for debugging API issues.

You might also like