Skip to main content

Postman - Storing and Retrieving Numeric Values from Environment Variables

If you are using Postman for your API testing and if you want to store and retrieve numeric values from environment variables, then here is a simple trick - use "Number" function. Let me explain the problem and solution.

Problem: I want to store numeric value in environment variable, for example - response time, then I want to retrieve the value from this environment variable and use for comparison.

Solution:
  1. To store response time in environment variable, use setEnvironmentVariable function
  2. To retrieve the value from environment variable, use postman.<variable_name>
  3. To convert variable value to number for comparison, use Number() function
 P.S. Click here to access my other posts.

Comments

  1. Thank you for useful information.The article about Storing and Retrieving Numeric Values from Environment Variables is very nice and it is very useful for everyone
    Mulesoft Online Training
    Mulesoft Training in Hyderabad

    ReplyDelete
  2. It is amazing to visit your site. Thanks for sharing this information, this is useful to me...
    Mulesoft Online training with 100% job Assistance and 24 X 7 Online Support. Visit us about : online mulesoft training | mulesoft online course

    ReplyDelete

Post a Comment