摘要: 检查json_key_value: 检查: requests.py # -*- coding: utf-8 -*-#@File :demo_04.py#@Auth : wwd#@Time : 2020/12/10 9:09 下午import jsonimport jsonpathimport req 阅读全文
posted @ 2020-12-12 03:20 极士* 阅读(201) 评论(0) 推荐(0)
摘要: key_value断言: demo5.run_check('json_key')传入json_key,调用self.function, self.function['json_key']() self.function是构造里面的一个字典类型的属性.里面指向了方法。 self.function['j 阅读全文
posted @ 2020-12-11 02:37 极士* 阅读(376) 评论(0) 推荐(0)
摘要: ⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️ 测试: 断言处理: demo_04.pyimport jsonjson_obj = {"access_token":"39_qHfCmB0GdutZ2MXC0G5IbzrM3WY7E 阅读全文
posted @ 2020-12-10 22:27 极士* 阅读(174) 评论(0) 推荐(0)
摘要: demo_01.py import requestsimport resession = requests.session()get_param_dict={ "grant_type":"client_credential", "appid":"wx55614004f367f8ca", "secre 阅读全文
posted @ 2020-12-10 19:19 极士* 阅读(128) 评论(0) 推荐(0)
摘要: re的使用参考:正则表达式基础及re模块:https://www.cnblogs.com/dream66/p/12953729.html import restr1 = '{"access_token":${token}}'dict1 = {'token': 'AFABMG'}#成果:{"acces 阅读全文
posted @ 2020-12-09 22:27 极士* 阅读(343) 评论(0) 推荐(0)
摘要: 举例子: demo01.py import jsonimport requestsimport jsonpathsession = requests.session()get_param_dict={ "grant_type":"client_credential", "appid":"wx5561 阅读全文
posted @ 2020-12-09 03:10 极士* 阅读(318) 评论(0) 推荐(0)
摘要: 多步请求封装,执行完一个用例 def requests(self,step_info): request_type =step_info['请求方式'] if request_type=="get": result=self.get(step_info) elif request_type == " 阅读全文
posted @ 2020-12-09 02:45 极士* 阅读(265) 评论(0) 推荐(0)
摘要: 字符串转化成字典: convert_to_dict.py: import jsonstr1 = '{"grant_type":"client_credential","appid":"wx55614004f367f8ca","secret":"65515b46dd758dfdb09420bb7db2 阅读全文
posted @ 2020-12-09 01:44 极士* 阅读(352) 评论(0) 推荐(0)
摘要: 将结果的所有数据整理如下: {'api_case_01': [{'测试用例编号': 'api_case_01', '测试用例名称': '获取access_token接口测试', '用例执行': '是', '用例步骤': 'step_01', '接口名称': '获取access_token接口', ' 阅读全文
posted @ 2020-12-08 02:53 极士* 阅读(145) 评论(0) 推荐(0)
摘要: 把excel_oper02.py 里面实现的:通过字典的方式获取所有excel数据.放进utils: ⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️⬇️ utils: def get_all_data(self): ''' 把 阅读全文
posted @ 2020-12-08 00:02 极士* 阅读(224) 评论(0) 推荐(0)