0% found this document useful (0 votes)
99 views

Postman Interview Questions

Postman is a free HTTP client-based software application and a collaboration platform for API development. It is mainly used to perform API testing and is a popular API client which facilitates developers and provides a platform to design, build, share, test, and document APIs. The document discusses what Postman is, why it is used, its key features and components of HTTP requests and responses.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
99 views

Postman Interview Questions

Postman is a free HTTP client-based software application and a collaboration platform for API development. It is mainly used to perform API testing and is a popular API client which facilitates developers and provides a platform to design, build, share, test, and document APIs. The document discusses what Postman is, why it is used, its key features and components of HTTP requests and responses.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 17

Top 55+ Most Asked Postman

Interview Questions and Answers


1) What is Postman?
Postman is a free HTTP client-based software application and a collaboration platform
for API development. It is mainly used to perform API testing. It is a very popular API
client which facilitates developers and provides a platform to design, build, share, test,
and document APIs. Postman supports testing of HTTP requests by utilizing GUI
(Graphical User Interface), which later we can execute and validate the responses.

The Postman tool also facilitates us to send HTTP/s requests to a service and get their
responses. We can ensure that the service is up and running by using this.

2) What was the Postman originally developed?


When the Postman was developed, it was originally a Chrome browser plugin. It extends
its solution with the native version for both Mac and Windows.

3) Why do we use Postman?


The Postman tool has become a choice of more than 8 million users. Following are the
main reasons for using Postman:

PlayNext
Unmute

Current Time 0:00

Duration 18:10
Loaded: 0.37%
Â
Fullscreen
Backward Skip 10sPlay VideoForward Skip 10s

o It is free: Postman is free software that we can use for API testing. It is free to
download and use for teams of any size.
o It is easy to use: Postman is an easy-to-use software tool. We can send HTTP
requests of various types (such as GET, POST, PUT, PATCH, etc.). We have to
download it, and we can send our first request in minutes. It also gives us the
ability to save environments for future use.
o Community & Support: It has a huge community forum for customer support
and extensive documentation.
o It is extensible: Postman facilitates us customizing it according to our needs with
the Postman API.
o APIs Support: It facilitates us to make any API call (REST, SOAP, or plain HTTP)
and easily inspect even the largest responses. It also helps manage the end-to-
end lifecycle of the API - starting from design to mocking to testing and finally
maintaining the APIs.
o Runtime Services: Postman provides Runtime Services that help us manage API
collections, environments, work-spaces, and different examples.
o Integration: Postman facilitates us to easily integrate test suites into our
preferred CI/CD tools and services, such as Jenkins with Newman (command-line
collection runner).

4) What is an API?
API is an acronym that stands for "Application Programming Interface". It is a set of
routines, protocols, and tools used for building Software applications. API is an interface,
so it specifies how one software program should interact with other software programs.

In other words, we can say that API is an Application Programming Interface that acts as
an interface between two software applications and allows these two software
applications to communicate with each other. API is a collection of software functions
that another software program can execute.
5) What are the various authorization methods
provided by Postman?
Postman provides the following API request authorization options:

o API Key
o Oauth 1.0
o Oauth 2.0
o Bearer Token
o Basic auth
o Digest auth
o Hawk Authentication
o AWS Signature
o NTLM Authentication

6) What is the use of the collection in Postman?


In Postman, a collection is used to group similar requests. It systematically arranges the
requests into folders.

7) What are the various tools used for API Testing?


Following is a list of some tools that are used for API Testing:

o Postman
o SoapUI
o Katalon Studio
o Tricentis Tosca
o Apigee
o Jmeter etc.
8) How can you access the Postman variables?
We can access the Postman variables by using the variable name as:{{variable_name}}

9) What are the different types of API requests


supported in Postman?
Following is a list of the different types of API requests supported in Postman:

o GET
o POST
o PUT
o PATCH
o COPY
o DELETE
o HEAD
o OPTIONS
o LINK
o UNLINK
o PURGE
o LOCK
o UNLOCK
o PROPFIND
o VIEW

10) What is an HTTP request? Give an example of an


HTTP request.
An HTTP request is a programming request made by the client to a named host located
on a server. HTTP works as a communication interface or a request-response protocol
between a client and server. The main aim of the HTTP request is to access a resource
on the server. To make the HTTP request, the client uses components of a URL (Uniform
Resource Locator), which includes the information needed to access the resource.

An example of the HTTP request:

A client (browser) sends an HTTP request to the server; then, the server responds to the
client. The response sent by the server contains the status information about the
request, and it can also contain the requested content.

11) What are the core components of an HTTP


request?
Following are the five core components of an HTTP request:

o HTTP methods: It is a set of request methods used to perform needed action for
a given resource (GET, PUT, POST, and DELETE).
o Uniform Resource Identifier (URI): It is a kind of address that describes the
resource.
o HTTP Version: It specifies the version of the HTTP. For example HTTP v1.1
o Request Headers: It specifies the content type and content length of the
request. For example: Content-type: application/ JSON, Content-Length: 511
o Payload: It is used to specify the Request Body that includes message content.

12) Why does Postman accept Base64 encoding


only?
Postman accepts Base64 encoding only because it transmits the data into the textual
form and sends it in an easier form, such as HTML form data. This is also preferred
because we can rely on the same 64 characters in any encoding language we want to
use.
13) Which type of encoding does Postman accept
authorization credentials and why?
Postman accepts authorization credentials in Base64 encoding only. This is inbuilt in
Postman, or else you can refer to a third-party website to convert the credentials in
base64. The Base64 authorization credentials are generally used because they transmit
the data into a textual form and send it in an easier form, such as HTML form data.

14) What are the core components of an HTTP


Response?
Following are the four core components of an HTTP Response:

o Status/Response Code: The server generates the status or response codes when
the client makes a request. For example, 404 means Page Not Found, and 200
means Response is OK.
o HTTP Version: It describes the HTTP version. For example: HTTP v1.1, HTTP v1.3
etc.
o Response Header: The Response Header includes the information for the HTTP
response message. For example, Content-type, Content-length, date, status, and
server type.
o Response Body: The Response Body contains the client's data requested from the
server.

15) What is the meaning of the term environment in


Postman?
In Postman, the term environment is a set of key-value pairs. You can create multiple
environments in Postman and switch among them quickly by pressing a button. There
are 2 types of environment, global and local.
16) Can we have two global scope variables with the
same name in Postman?
The global variables are global, so we cannot set duplicate names for them without any
environment as it creates confusion for the software. On the other hand, local variables
can have the same name but in different environments.

17) Which one is preferred in Postman, a global or


local variable?
In Postman, if 2 variables have the same name (one being local, the other global), then
the higher priority is of the local variable. The local variable will overwrite the global
variable.

18) How can you log variable values in Postman?


In Postman, we can log the variable values in the console by using the following
command:

1. console.log(pm.variables.get("variable_name"));

19) What is the use of Postman monitor?


The Postman monitor is used for running collections. Collections run till the specified
time defined by the users. It requires the users to be logged in, and the users share the
Monitor reports over an email on a daily or monthly basis.

20) What do you understand by team workspace in


Postman?
As we know, a workspace is a collaborative environment for users to develop and test
APIs. In the same way, a team workspace is a workspace that is shared by the whole
team working on the same collections of requests. Usually, it is time-consuming and
hard to share the collections through external drives or other sharing; the team
workspace synchronizes and collaborates all the team's work in one place.

21) What is the difference between Query Params


and Path Variables?
Query Params or Query Parameters are used for sorting or filtering the resources. On
the other hand, Path Variables are used for identifying specific resources.

22) What is the use of Postman Collection runners?


The Postman Collection runner is used to perform Data-driven testing. It runs a group of
API requests for multiple iterations with different data sets.

23) What is Basic Auth in Postman?


In Postman, Basic Auth is an authorization technique provided for HTTP user agents like
web browsers to enter username and password. After entering the username and
password, it gets associated with the request.

24) Can we import local variables in Postman


Monitors?
Yes, we can import local variables in Postman Monitors, but it is not allowed to import
global variables in Postman Monitors.

25) What are the main limitations of Postman?


Following is the list of key limitations of Postman:
o Postman cannot process 1000+ API requests.
o In the case of huge projects, it isn't easy to manage the collections and requests.
o Postman is not suitable for managing the workspace in the form of code. This is
because there would be a lot of code duplication for dynamic API requests.

26) What is a binary form in POST methods? What is


its usage?
In POST methods, the binary form is designed to send data easily in a format it is
impossible to enter data manually. This is mainly used when sending large files like
images, CSV files, etc., in the POST request. The binary representation is one of the
easiest representations used for sending complex data with the request.

27) What is the use of Postman cloud when we are


working in a company?
The Postman cloud is a common repository of companies to access Postman collections.
That is why we use it when we are working in a company. We can save the work
instantly in the Postman cloud after logging in. It facilitates the team members to access
data/collections from anywhere.

28) What is digest auth in Postman?


The digest auth or digest authorization is one of the authorization techniques provided
by Postman. This technique lets the clients send the request first to the API and get
responses from the server, including a number that can be used only once a real value
and 401 unauthorized responses. After that, the client can send back an encrypted data
array with both username and password and the data received from the server earlier.
Now, the server uses this data to generate an encrypted data string and compares this
with what was sent for authenticating the request.
29) Why is it not suggested to save work in Postman
cloud?
It is not suggested and is not preferred to save your work in the Postman cloud as the
company's work is not allowed to be leaked and remain confidential. While saving your
work on Postman cloud, it may cause a security breach as it requires sign-in. That's why
the Postman Cloud is not suggested for saving work, and team workspace is highly
preferred.

30) What do you understand by status code 201?


The status code 201 means created when you have successfully created a resource using
POST or PUT request. It returns a link to a newly created resource using the location
header.

31) What is the procedure to remove local variables?


The local variables are automatically removed once you have executed and completed
the tests.

32) What is the procedure to save the responses of


API to a file in Postman?
In Postman, there are two ways to save the responses of an API to a file:

o First, click on the download button in the response section.


o Second, click on the arrow next to the send button. Here, you will see an option
to send and download. After clicking on it, you will get a prompt Postman asking
for the location of saving the response post successful request execution.

33) What is the meaning of the status code 304?


The status code 304 means NOT MODIFIED. It is used to minimize the network
bandwidth usage in conditional GET requests. The response body should be empty.
Headers should have a date, and location, etc.

34) What is the use of the 301 status code in


Postman?
In Postman, the 301 status code is used to specify that the page has been permanently
redirected from one website page to another. It tells the search engine that the old page
is outdated, and the search engine has to index the new page URL.

35) What is the method to organize requests in


Postman?
We can organize requests in Postman with the Collections.

36) What are the various variable scopes provided by


Postman?
Following is a list of several variable scopes provided by Postman:

o Global Variables: Global variables allow data access between different


collections, requests, and scripts. They are available throughout the workspace.
o Local Variables: Local variables are the temporary variables that can be accessed
only within the scope of requests scripts. Depending on the requirements, these
variables are either scoped to a single request or single collection. These variables
are not available once the script execution is completed.
o Environment Variables: The Environment variables allow us to tailor the
requests about different development environments such as local testing, stage
testing, or prod testing.
o Collection Variables: The Collection variables are independent of the
environment and scoped to be available for all the requests present within the
collection.
o Data Variables: The Data variables come from external JSON or CSV files and
define the datasets required to run the collection in Collection Runner or
Newman.

37) What is the difference between the form data and


x-www-form-urlencoded?
The key difference between the form data and x-www-form-urlencoded is that the URL
will be prearranged when sent through x-www-form-urlencoded.

38) In which conditions should we use global,


collection, and local variables?
Global variables are the general-purpose variables. They are used while passing data to
other requests and are ideal for quick results and prototyping.

Collection variables are generally used for storing some constants that do not change
during the execution of the collection. These variables are used for constants that do
not change during the execution and URLs / authentication credentials if only one
environment exists.

Local variables are the temporary variables and are only available within the request that
has set them or when using Newman/Collection runner during the script execution.
These variables are used whenever we have to override all other variable scopes.

39) How can we access the history of requests in


Postman?
In Postman, we can access the history of requests in the History tab provided on the
Postman application. When we sign into the Postman account, the history will be synced
across the devices where you are logged in. After clicking on any of the requests present
in the History tab, the view will open the request that we saved while working on it
earlier. History also contains the collection runs that were executed as summarized
versions.

When you click on the "View More option" on the request, you will see options to save,
document, monitor, delete or mock the request. You can also select multiple requests by
using Command or Control button and then clicking on the request.

40) How can we stop executing requests or stop the


collection run?
We can stop executing requests or stop the collection run by using the following
command:

1. postman.setNextRequest(null);

41) Is it possible to reuse the authentication token


for multiple requests?
Yes, it is possible to reuse the authentication token for multiple requests. We can
achieve it by creating a collection and adding all the requests having the same
authentication token to that collection and then assigning the auth token to the same
collection. We can apply it to the individual requests by selecting the "Inherit auth from
parent" option in the Authorization tab.

42) Where are the query parameters stored in a GET


request in Postman?
In the GET request, the query parameters are stored in the URL in Postman.

43) What is executed first in a collection run?


The pre-request scripts at the compilation level are executed first in a collection run.

44) How can we access a Postman variable?


We can access a Postman variable by entering the variable name as {{var}}.

45) Which tool can be used to run Postman


collections in Jenkins?
We can use the Newman tool to run Postman collections in Jenkins.

46) What are the most commonly seen status codes


in Postman?
Following is the list of most commonly seen status codes in Postman:

o 200 (OK): Status code 200 specifies that the request was correct.
o 201 (Created): Status code 201 specifies that the value wrapped with the request
has been created in the database. Here, it is obvious that the request was correct.
o 204 (No Content): Status code 204 specifies that the request was correct and
received, but there is no content to send. It means there is no response to send
to the client by the server.
o 400 (Bad Request): Status code 400 specifies a bad request. A bad request
means that the syntax of the request was incorrect. It appears when we have sent
the wrong parameters along with the request URL or in the request's body.
o 401 (Unauthorized request): Status code 401 specifies an unauthorized request.
An unauthorized request is a request for which you are not authorized. This
status code appears when we are not authorized to access the server or enter the
wrong credentials.
o 404 (Not Found): Status code 404 specifies that the server was connected, but it
could not find what was requested. It simply means "request not found". This
status code normally appears when we request a web page not available on the
server.

47) What is Scratch Pad?


Postman provides a space known as Scratch Pad. The Scratch Pad facilitates us to work
without being connected to Postman servers and also provides the flexibility to utilize
some of the features of Postman offline. These features include collection creation,
creating requests, and the ability to send requests. The Scratch Pads are stored locally,
and once logged in; the work is saved into the workspace.

48) What are the different Request Method types in


Postman?
The different Request Method types in Postman are as follows:

o Get
o Post
o Put
o Delete
o Patch
o Head
o Delete

49) How can you iterate a request 100 times in


Postman?
We can iterate a request 100 times in Postman using Collection Runner.
50) What are some examples of the JS libraries
available in Postman?
Some examples of the JS libraries available in Postman are Lodash, Moment, GUID, etc.

51) What is the full form of GUID? Where is it used?


GUID is an acronym that stands for Global Unique Identifier. It is a set of hexadecimal
digits separated by hyphens and solves the purpose of uniqueness.

In Postman, it is used to generate and send a random value to APIs.

Example:

1. {
2. "id": "{{$guid}}",
3. }

52) Which programming language is used for


Postman tests?
JavaScript is used for Postman tests.

53) How can you generate random numbers of a


given range in Postman?
In Postman, we can generate random numbers of a given range using some script.
Suppose you want to generate numbers between the range of 1 to N, then use the
following pre-request script:

1. pm.globals.set('randomNumber', Math.floor(Math.random()* N));

Now, use this variable in the URL as {{randomNumber}}


54) How can we view request logs and response logs
in Postman?
We can view request logs and response logs in Postman through the Postman Console
window.

55) What is the binary form in the Post method in


Postman?
In Postman, the binary form is designed to send the information in a specific format that
cannot be entered manually. For example, images, files, etc. Everything in a computer is
converted to binary.

56) How can you organize requests in Postman?


In Postman, we can use Collections to organize requests.

57) Which method is preferred to write the tests?/


JavaScript or Functional?
The functional method is advised and recommended while writing tests in Postman.
Although we can use JavaScript methods, there has been no notice of ending the
support for the JavaScript method.

You might also like