创建环境

postman使用
    




PostMan接口测试(很全面的接口测试教程)

 创建collections

postman使用
    




PostMan接口测试(很全面的接口测试教程)

 

 之后创建的request都可以保存到某个collections里

设置token

postman使用
    




PostMan接口测试(很全面的接口测试教程)

postman使用
    




PostMan接口测试(很全面的接口测试教程)

// console.log("domain")
// console.log(pm.environment.get("token"));
var response = pm.response.json();
if( response.code == 200) {
    var token = response.token;
    pm.environment.set("token", token);
}

其他接口使用token变量

postman使用
    




PostMan接口测试(很全面的接口测试教程)

 

 

详细全面的postman接口测试实战教程

PostMan接口测试(很全面的接口测试教程)

Postman接口测试神器从安装到精通

相关文章: