当前位置:网站首页>Postman environment variable settings

Postman environment variable settings

2022-07-06 10:44:00 Wang Dashan 0928

In the process of the project, we often encounter a variety of environments , Such as development environment 、 Test environment 、 Preproduction environment , Production environment, etc . And different environments have different values , Mainly reflected in the different access addresses . Therefore, we can use environment variables to manage different values .
Example : Query and set the location of mobile phone number 2 Environment , They are test environment and pre production environment .
Ideas :
1. Add send request interface
2. add to 2 Environment groups , Set different parameter values in different environment groups
3. Call different environment variables in the request according to the requirements , grammar :{ { Variable name }}
4. Send a request , View results

step 1、 Add request interface ;
step 2、 Add environment group , Click on environment -> Click on + ;
 Insert picture description here
step 3、 Add the environment group name under the environment group 、 environment variable , And assign a value to the variable ;
 Insert picture description here
step 4、 Call the environment variable in the request ;
 Insert picture description here
step 5、 Select environment group ;
 Insert picture description here
step 6、 Send a request , View results ;

原网站

版权声明
本文为[Wang Dashan 0928]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202131657207521.html