How to Create an Environment in Postman?

PostmanREST APISOAP API

We can create an Environment in Postman. An Environment is a group of variables that we can use in a Postman request. By creating Environments for production, testing, staging and so on, we can run the same URL in various Environments.

Step1 − Click on the eye icon beside the No Environment dropdown and then click on the Add link within the Environment section.

Step2 − MANAGE ENVIRONMENTS pop-up opens up. We will enter the Environment name. Here, we have added the variable u and the value as https://jsonplaceholder.typicode.com/users. Then close the pop-up.

Step3 − The new Environment (ENV1) displays as one of the items in the No Environment dropdown.

Step4 − Choose the ENV1 environment and add {{u}} in the address bar. To keep an Environment variable in a request we have to enclose it with double curly braces {{<Environment variable name>}}.

Step5 − Click on Send. This Environment variable is used instead of the actual URL(https://jsonplaceholder.typicode.com/users).

raja
Published on 25-Jun-2021 14:14:29
Advertisements