What are the different types of variables in Postman? How and when to use them?

Four types of variables and their scopes

Pricilla Bilavendran
6 min readJul 7, 2021

Dear People,

I hope you are all safe!

Today we are going to learn something in Postman which will be very helpful and save our time in most of the scenarios.

If you have worked on any programming language, you would have worked with variables with different scopes. They are nothing but placeholders to hold some value or result of some expressions. We have the same variable concept in Postman with few scopes.

Variables here are typically used in a context where you need to replace values in request bodies, make assertions for the response body and use them in pre-request scripts.

Let’s try to understand different variable scopes in Postman.

Different types of variable scopes are as below:

  1. Global
  2. Collection
  3. Environment
  4. Local
  5. Data variables (Please refer this post, data driven approach handles with data variables)

1. Global

What are Global Variables and when should they be used?

--

--