This course is created for complete beginners.
Get started with POSTMAN step by step.
If you are a complete beginner on Postman, this course is for you. Very basic step by step videos to guide you from scratch.
This course is created for complete beginners.
Get started with POSTMAN step by step.
If you are a complete beginner on Postman, this course is for you. Very basic step by step videos to guide you from scratch.
In this session we will learn
What is POSTMAN
How to download and install
Understand Postman GUI
Create Collections, Variables, Environments and Tests
Data Driven Testing
Run from command-line and Jenkins
Let's Get Started...
What is Postman
Postman is a platform for API
Development
Testing
Management
Step 1 - Goto Postman website https://www.postman.com/ | Create Account
Check Email and verify account
Step 2 - Login to Postman
Step 3 - Explore GUI and features
Step 1 - Select the HTTP Method
Step 2 - Add the API endpoint
Step 3 - Add Headers, Authorizations etc as needed
Step 4 - For POST, PUT requests add Body
Step 5 - Save & Run, Check response
In web services, POST requests are used to send data to the API server to create or update a resource. The data sent to the server is stored in the request body of the HTTP request
It's worth noting that a POST request is non-idempotent
It mutates data on the backend server (by creating or updating a resource), as opposed to a GET request which does not change any data
Similar to POST, PUT requests are used to send data to the API to update or create a resource
The difference is that PUT requests are idempotent. That is, calling the same PUT request multiple times will always produce the same result
In contrast, calling a POST request repeatedly make have side effects of creating the same resource multiple times
Generally, when a PUT request creates a resource the server will respond with a 201 (Created), and if the request modifies existing resource the server will return a 200 (OK) or 204 (No Content)
A PATCH request is one of the lesser-known HTTP methods
The difference with PATCH is that you only apply partial modifications to the resource
The difference between PATCH and PUT, is that a PATCH request is non-idempotent (like a POST request)
To expand on partial modification, say you're API has a /users/{{userid}} endpoint, and a user has a username
With a PATCH request, you may only need to send the updated username in the request body - as opposed to POST and PUT which require the full user entity
As the name applies, DELETE APIs delete the resources (identified by the Request-URI)
DELETE operations are idempotent. If you DELETE a resource, it’s removed from the collection of resources
Some may argue that it makes the DELETE method non-idempotent It’s a matter of discussion and personal opinion
1. What is COLLECTION
2. How to create Collection
3. How to create folders inside collection
4. How to arrange requests inside collection
Collection is a group of API requests
Raghav Pal
Can create variables at the following levels (scope)
Global
Collection
Environment
Data
Local
Priority
Local
Data
Env
Collection
Global
Set Variables with script
Global: pm.globals.set("name", "Edison");
Collection: pm.collectionVariables.set("name", "Newton");
Environment: pm.environment.set("name", "Rutherford");
Local: pm.variables.set("name", "Ramanujan");
Environment is a set of key-value pairs
Step 1 - Create an api request
Step 2 - Create environments and add key-value pairs (variables)
Step 3 - Refer the variables in request
Step 4 - Select the environment from dropdown and run request
Step 5 - Create more environments and execute request
Postman contains a powerful runtime based on Node.js that allows you to add dynamic behavior to requests and collections
You can add JavaScript code to execute during 2 events in the flow:
Before a request is sent to the server, as a pre-request script under the Pre-request Script tab.
After a response is received, as a test script under the Tests tab.
Postman will prompt you with suggestions as you enter text. Select one to autocomplete your
code
You can add pre-request and test scripts to a collection, a folder, a request within a collection, or a request not saved to a collection
Tests in Postman are JavaScript code that is executed after receiving response
Step 1 - Create a API request
Step 2 - Check the tests section under
Request
Collection
Folder
Step 3 - Create and run tests
Debugging scripts can be written under either the Pre-request Script tab or the Tests tab, with helpful messages logged in the Postman Console
The Postman Console logs the following information:
● The primary request that was sent, including all underlying request headers, variable values, and redirects
● The proxy configuration and certificates used for the request
● Network information such as IP addresses, ciphers, and protocols used
● Log statements and asynchronous requests from test or pre-request scripts
● The raw response sent by the server before it's processed by Postman
Step 1 - Create an API request
Step 2 - Create variables and refer in the request
Step 3 - Goto Run Collection
Step 4 - Create a CSV file and add data - Refer this file in Run Collection Step 5 - Create a JSON file and add data - Refer this file in Run Collection Step 6 - Refer data in test scripts
tests["verify email"] = responseBody.has(data.email)
tests["verify email"] = responseBody.has(data["email"])
Authorization = Verify the Identity
Step 1 - Create a API request
Step 2 - Goto Authorization tab
Step 3 - Add authorization as needed
Step 4 - Save & Run
more stories by Raghav - https://automationstepbystep.com/stories/
Today we will learn:
1. How to debug with Postman Console
2. How to open Postman Console window
3. Information shown on Postman Console window
4. Clear logs
5. console.log()
console.info()
console.warn()
console.error()
6. App Debug Logs : Developer - DevTools
Pre-requisite - previous session - How to run from command line
Today we will learn:
1. How to setup Postman job in Jenkins
2. How to run Postman from Jenkins
Today we will learn:
1. What is a workspace
2. How to create and manage workspace
3. How to share collections in workspaces
4. How to remove a collection from workspace
Workspace is an area where you can group, organize and manage your collections
Workspaces are available from Postman 6.0 ver
Today we will learn:
1. What are MONITORS
2. How to create Monitors
3. How to send email notifications with results
4. How to edit/pause/stop Monitors
Monitors - help to run collections periodically to check the performance and response of api
Notes:
Each Postman user gets 1,000 monitoring calls for free per month.
Each Postman Pro and Enterprise team gets 10,000 free monthly requests
Today we will learn:
1. What is API Documentation
2. How to create API Documentation
3. How to publish (private and public) Documentations
4. How to unpublish
What is API Documentation
a Postman feature that lets you share API documentation in a beautifully formatted web page.
Useful TIPS
----------------
1. When you select an environment. The variables e.g. {{url}} will be replaced by their values from the selected env in documentation.
2. If you have any confidential data (passwords etc) remove them before publishing the documenation
Today we will learn:
1. How to get Collection URL
2. How to run Collection remotely (from anywhere) using collection url
Step 1 : Get your collection url
Step 2 : Get Newman and run with command
newman run "url"
Today we will learn:
1. How to add SOAP request in Postman
2. Run and Validate
Step 1 : Get Soap request url or WSDL url add to request url
Step 2 : Set method as POST
Step 3 : Set body as raw and set text/xml
Step 4 : Provide request data in body
Step 5 : Run and validate
In this lecture, we will learn:
What is Mock API
Why we need Mock APIs
How to create Mock APIs in Postman
Today we will learn : What is Postman
API Client
develop, test, share, document APIs
Step 1: Open Postman webpage - https://www.getpostman.com/
Step 2: Create a free account
Step 3: Activate the account
Step 4: Download and install postman app
Today we will learn:
1. About POSTMAN UI
2. Different sections of the interface
3. Header, Sidebar, Builder
Today we will learn:
1. How to create an API request
2. How to run the request
3. How to analyze response
Today we will learn:
1. What is COLLECTION
2. How to create Collection
3. How to create folders inside collection
4. How to arrange requests inside collection
Today we will learn:
1. What are variables in POSTMAN
2. Why use variables
2. How to create variables
3. How to refer variables
Useful TIPS
WHAT
variables - elements(data store) that can take different values
WHY
to reuse values at multiple places
avoid repetition
to avoid re-work when value changes
Today we will learn:
1. How to get variables through scripts
2. How to set variables through scripts
pm.variables.get();
pm.variables.set();
pm.globals.get();
pm.globals.set();
pm.environment.get();
pm.environment.set();
Today we will learn:
1. What is Environment
2. How to create Environment
3. How to use Environment
4. How to delete Environment
Env is a set of key-value pairs
Reference - https://reqres.in/
Today we will learn:
1. How to create quick scripts using Snippets
Snippets = script templates
Today we will learn:
1. What are Tests in POSTMAN
2. How to create tests at REQUEST level
3. How to create tests at FOLDER level
4. How to create tests at COLLECTION level
Postman tests are javascript code that is executed after receiving the response
________________________________________________________________
Today we will learn:
1. How to get data from csv file
2. How to get data from json file
3. How to Run data-driven API Requests
4. How to Run data-driven Tests
Useful TIPS
Data variables can be used wherever environment variables can be used except in pre-request and test scripts
References :
https://reqres.in/
https://codebeautify.org/jsonviewer
Basics of Authorization
A simple example and demo
Note - if you provide authorization at collection or folder level, In the request authorization, Select - "Inherit auth from parent"
When you add Authorization, some headers get added in the request, You can check by going to Headers tab and view hidden Headers
OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.
Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.
Find this site helpful? Tell a friend about us.
We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.
Your purchases help us maintain our catalog and keep our servers humming without ads.
Thank you for supporting OpenCourser.