postman简单使用

postman百度网盘下载地址:https://pan.baidu.com/s/1nuO2CGT

下载压缩后

打开chrome输入chrome://extensions/

把文件拖到浏览器中

启动postman,创建项目

 post请求

1.点击+

2.选择请求方式post

3.输入请求地址

4.选择raw,填写请求参数

5.Send

 

检查

tests["status code is 200"]=responseCode.code===200;//检查Status code是否为200
tests["testtime<200"]=responseTime < 200;//检查请求耗时时间是否小于200ms
tests["Body matches string"] = responseBody.has("操作成功");//检查返回数据中是否有操作成功

原文地址:https://www.cnblogs.com/yanzhe/p/7561717.html