美文网首页
接口测试的代码实现

接口测试的代码实现

作者: 软件测试笔记 | 来源:发表于2018-05-25 11:17 被阅读0次

背景:Python3版本的接口测试,安装导入Python的第三方库requests即可

参考文档:http://docs.python-requests.org/zh_CN/latest/user/quickstart.html

1.get请求

获取响应结果的response.status_code,response.text,response.headers,response.cookies等等县城的函数,具体可以查看Python的官方文档

2.post请求,入参有四种格式,这里主要说明常用的json格式

相关文章

网友评论

      本文标题:接口测试的代码实现

      本文链接:https://www.haomeiwen.com/subject/bbuyjftx.html