postman add environment variables

Usually have multiple test environments, for the same interface, it may just change the domain name, then you can add postman environment variables for switching the test environment.

 

To log interface as an example: https://www.cnblogs.com/nicole-zhang/p/11496543.html

 

 As shown, top right, click the gear

 

Click Add

 

 

 Figure saved as input

At this time, the upper right corner to switch the test environment, as shown in

 

 Configuration can be used after the handover good host, changing the interface addresses below

 

Such different test environment test interface, only need to switch to environment.

 

If the account password is inconsistent different environments can also modify environment variables, add username and password parameters.

After a small gear, just set the environment variable name points to open the Edit

 

 Update environment variables have been added username and password

 

 Writing a corresponding Interface modifications may be made, using the value of the environment variable, as shown

 

 So you can apply it without testing environment

Guess you like

Origin www.cnblogs.com/nicole-zhang/p/11498384.html