摘要:
json/xml响应断言 json path 断言 因为results框架没有提供关于json的,所以我们用一个第三方库(python的):jsonpath,用之前import一下 xml断言 第三方库:XMLSession xpath断言 xml解析 如果要自己解析xml: hamcrest断言体 阅读全文
posted @ 2022-02-27 22:52
云啊云的囤粮地
阅读(60)
评论(0)
推荐(0)
摘要:
json/xml请求 结构化请求体构造JSON XML 一、json 请求体构造 会发现送出去的1是数字而不会变成字符串 二、xml 请求构造 requests框架没有封装xml的,所以需要自己写,并且需要给header的content-type变成xml,让它知道你在传xml 三、复杂数据解析 3 阅读全文
posted @ 2022-02-27 22:42
云啊云的囤粮地
阅读(98)
评论(0)
推荐(0)
摘要:
接口测试断言 def test_header(self): headers = {"h":"header demo"} r = requests.get('https://httpbin.testing-studio.com/get',headers=headers) print(r.json()) 阅读全文
posted @ 2022-02-27 21:03
云啊云的囤粮地
阅读(48)
评论(0)
推荐(0)

浙公网安备 33010602011771号