Postman
API Testing
Thilini Marasinghe
2739
Contents
Introduction to Postman........................................................................................................ 2
Objective ................................................................................................................................ 2
Tools and Technology used.................................................................................................... 2
How It Woks ........................................................................................................................... 2
Setup & Installation ............................................................................................................... 2
Basic API Terminology ............................................................................................................ 3
Create and Send a Request .................................................................................................... 3
Types of Requests .................................................................................................................. 3
Test Explanation..................................................................................................................... 3
Create a Collection ................................................................................................................. 3
Conclusion .............................................................................................................................. 6
Page 1|7
Introduction to Postman
Postman is a collaboration platform for API development. Postman is a tool used to
test APIs by sending different types of HTTP requests (GET, POST, PUT, DELETE)
and validating the responses. It helps developers and QA testers interact with APIs
easily.
• Send requests to APIs (GET, POST, PUT, DELETE)
• Test responses
• Automate testing
• Save and organize API collections
Objective
Provide a complete guide on how to use Postman for API testing. It helps users understand
how to send requests, verify responses, write tests, and automate API test cases.
Tools and Technology used
• Postman Desktop Application
• RESTful API (e.g., JSONPlaceholder)
• JavaScript (for test scripts)
• Newman (Postman CLI - optional)
• [Link] (for Newman if used)
• Optional: Mock Servers or Backend APIs
How It Woks
• Postman acts as a client to send HTTP requests (GET, POST, PUT, DELETE) to APIs.
• The API processes the request and sends back a response.
• Postman captures the response and allows validation using test scripts.
• Users can organize requests into collections, use variables, and run tests with
automation tools like Newman.
Setup & Installation
1. Go to [Link]
2. Download and install Postman (Windows, macOS, or Linux)
3. (Optional) Create a free Postman account
Page 2|7
Basic API Terminology
Term Meaning
Endpoint A URL to access an API resource
HTTP Methods GET, POST, PUT, DELETE
Request Body Data sent with POST/PUT
Response Output returned by the API
Status Codes 200 OK, 201 Created, 404 Not Found,
500 Server Error
Create and Send a Request
Steps
• Open Postman → Click "New" → "Request"
• Select method: GET
• Enter the URL
• Click Send
Types of Requests
• GET /posts - Retrieve data
• POST /posts - Create new data
• PUT /posts/1 - Update data
• DELETE /posts/1 - Remove data
Test Explanation
Here’s a simple application example for MySLT website using Postman, assuming
MySLT has an API for handling user data, internet packages, or service requests.
Create a Collection
1. Open Postman
2. Click "Collections" > New Collection
3. Name it: Myslt
Page 3|7
Step 1
• Add requests POST
• Add Request URL
• Add Body – User name and Password
Figure 1 postman login
Add x-ibm-client-id in Headers
• Get x-ibm-client-id – Write Click → Inspect → Click network →
• Reload Page.
• Click Login → copy x-ibm-client-id
Figure 2 client id
• Next Click Send Button.
• Response display Access Token and Refresh Token
• Test Results PASSED
Figure 3 access token
Page 4|7
Step 2
• Test - Get Request
• Add Request URL
• Add Header → x-ibm-client-id
Figure 4 Client Id - get
Next Add Authorization
Bearer Token → Access Token - Copy and Past
Figure 5 bearer token
Page 5|7
Next Click Send Button and Response Display
Figure 6 response - Pass
Conclusion
Postman is a powerful tool to test and understand APIs. Learning it will give you a strong
foundation in web development and testing.
Page 6|7