lsekfe 发表于 2021-2-22 10:07:37

没有接口文档,如何写接口测试

  1、接口文档没有提及的一个查询的接口
http://www.51testing.com/attachments/2021/02/15326880_202102041721441FR78.png
  文档没有提及根据手机号查询交易流水。
  2、WEB根据手机号查询交易流水
http://www.51testing.com/attachments/2021/02/15326880_202102041721531USqM.png
  3.写postman的接口测试
  (1)路径url:postman的url和前端的url是一样的
  (2)发送请求:post
  (3)请求头:a.Content-Type互联网媒体类型:application/json键-值”对的方式组织的数据
  b.认证信息:Authorization登录的时候获取http://**web.yidianche.net/pressure/132****(这个是专门用来获取Authorization认证信息的)区别:http://***web.yidianche.net/performance132***(这个是前端直接登录,不需要扫描)
  (4)请求体body:raw方式,写成字符串的形式WEB和postman的数据也是一样的
http://www.51testing.com/attachments/2021/02/15326880_202102041722021RJPj.png
http://www.51testing.com/attachments/2021/02/15326880_20210204172210186co.png
  4、根据web上的搜索输入框,至少要写4个接口用例
http://www.51testing.com/attachments/2021/02/15326880_202102041722191UpUW.png
  (1)手机号:

  data:"{"page":1,"rows":10,"orderNo":"","mobilePhone":"132**","payWater":"","startCreateTime":"","endCreateTime":""}"

  (2)购买订单

  data:"{"page":1,"rows":10,"orderNo":"UAT20190314095925004**","mobilePhone":"","payWater":"","startCreateTime":"","endCreateTime":""}"

  (3)微信单号

  data:"{"page":1,"rows":10,"orderNo":"","mobilePhone":"","payWater":"UAT2019031409592000522","startCreateTime":"","endCreateTime":""}"

  (4)交易时间

  {"data":{"page":1,"rows":10,"orderNo":"","mobilePhone":"","payWater":"","startCreateTime":"2019/03/14","endCreateTime":"2019/03/14"}}

  5.接口文档中一些非必须的参数,是提供查询时的选项
http://www.51testing.com/attachments/2021/02/15326880_2021020417222911gw7.png
http://www.51testing.com/attachments/2021/02/15326880_202102041722371Lbjg.png

lifewange 发表于 2021-3-11 15:28:00

分析需求,设计方案
页: [1]
查看完整版本: 没有接口文档,如何写接口测试