postman(一)常用的Tests方法
1、断言:判断状态码为200# 手动写tests["响应码为200"] = responseCode.code === 200# postman自带:Status code:Code is 200pm.test("Status code is 200", function () { pm.response.to.have.status(200);}); 2、断言:判断响应体包含某字符字符可以是key、value。多个自读用“,”分割# 手动写tests["包含XX"]=res
原创
2021-06-22 21:11:24 ·
3161 阅读 ·
0 评论