官方測(cè)試?yán)樱?a target="_blank" rel="nofollow">https://learning.getpostman.com/docs/postman/scripts/test_examples
一些技巧記錄:
1.快速設(shè)定變量-右鍵操作:

image.png
好了之后可以右上角查看:

image.png
2.快速設(shè)定相應(yīng)的編碼格式,我們?cè)谡?qǐng)求接口應(yīng)該都看到中文字符編碼。通過右鍵快速操作編碼

image.png
如果在postmain的操作編碼可以這樣操作。

image.png
3.完成相應(yīng)的登錄之后token的預(yù)處理,同理可以借鑒到其他接口需要保留數(shù)據(jù)的內(nèi)容

image.png
具體可以參考:
https://jlhxxxx.github.io/postman-start.html