• +91 9723535972
  • info@interviewmaterial.com

Postman Interview Questions and Answers

Postman Interview Questions and Answers

Question - 61 : - How can you generate random numbers of a given range in Postman?

Answer - 61 : -

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:

pm.globals.set('randomNumber', Math.floor(Math.random()* N));  
Now, use this variable in the URL as {{randomNumber}}

Question - 62 : - What is the full form of GUID? Where is it used?

Answer - 62 : -

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:

{  
"id": "{{$guid}}",  
}  

Question - 63 : - What are some examples of the JS libraries available in Postman?

Answer - 63 : -

Some examples of the JS libraries available in Postman are Lodash, Moment, GUID, etc.

Question - 64 : - How can you iterate a request 100 times in Postman?

Answer - 64 : -

We can iterate a request 100 times in Postman using Collection Runner.

Question - 65 : - What are the different Request Method types in Postman?

Answer - 65 : -

The different Request Method types in Postman are as follows:

  • Get
  • Post
  • Put
  • Delete
  • Patch
  • Head
  • Delete

Question - 66 : -
What is Scratch Pad?

Answer - 66 : -

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.

Question - 67 : - What are the most commonly seen status codes in Postman?

Answer - 67 : -

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

  • 200 (OK): Status code 200 specifies that the request was correct.
  • 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.
  • 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.
  • 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.
  • 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.
  • 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.

Question - 68 : - How can we access a Postman variable?

Answer - 68 : -

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

Question - 69 : - What is executed first in a collection run?

Answer - 69 : -

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

Question - 70 : - Where are the query parameters stored in a GET request in Postman?

Answer - 70 : -

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


NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners