• +91 9723535972
  • info@interviewmaterial.com

Postman Interview Questions and Answers

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

Answer -

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}}

Comment(S)

Show all Coment

Leave a Comment




NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners