Tips for using postman

Parameter value encryption
When using postman for interface testing, you will often encounter parameter value encryption, such as the use of sign MD5 encryption. The following is the method for postman to encrypt:

Refer to the official documentation:

https://www.getpostman.com/docs/sandbox

We can encrypt through CryptoJS, open the postman interface to request the interface
postman

Enter the following script in Pre-request Script:

var str = environment.variable_1 + environment.variable_2;
var hash = CryptoJS.MD5(str).toString();
postman.setEnvironmentVariable('hash', hash);
Then enter the sign keyvalue in the requested url Params { {hash }}, you can add the encrypted value to the sign, and other encryption methods can be implemented by referring to official documents and templates.

Guess you like

Origin blog.csdn.net/Love_Polaris/article/details/102605660
Recommended