摘要: import osimport timeimport unittestfrom BeautifulReport import BeautifulReportfrom Common.Log_common import LOGfrom Common.login import change_userfro 阅读全文
posted @ 2022-03-11 12:26 我的博客16000 阅读(111) 评论(0) 推荐(0) 编辑
摘要: import unittestfrom common.getTestData import paramName1from common.http_requests import http_requestsfrom common.log import logfrom conf.config impor 阅读全文
posted @ 2022-03-11 12:25 我的博客16000 阅读(34) 评论(0) 推荐(0) 编辑
摘要: paramName1: dec: "例子1" parameters: - path : /portal/tma1 data : {'key':'1'} header : {'content-type': 'appliction/json'} - path : /portal/tma2 data : 阅读全文
posted @ 2022-03-11 12:23 我的博客16000 阅读(33) 评论(0) 推荐(0) 编辑
摘要: import osfrom configparser import ConfigParserclass Config(): path_config=os.path.join(os.path.dirname(__file__),'config.ini') #section section_baidu= 阅读全文
posted @ 2022-03-11 12:21 我的博客16000 阅读(71) 评论(0) 推荐(0) 编辑
摘要: [baidu]environment=win7vresioncode=V1.0host=www.baidu.com[sogou]environment=win7vresioncode=V1.0host=www.sogou.com 阅读全文
posted @ 2022-03-11 12:20 我的博客16000 阅读(27) 评论(0) 推荐(0) 编辑
摘要: import osimport yaml######解析yaml文件得到我们方便调用的想要的数据格式,3步#####1.先解析所有的yaml文件,解析出来的结果是一个字典,key的名称是每一个yaml文件中的牌头,value也是一个字典,#######它的key是yaml中的dec和paramete 阅读全文
posted @ 2022-03-11 12:19 我的博客16000 阅读(100) 评论(0) 推荐(0) 编辑
摘要: """封装log方法"""import osimport logbookfrom logbook.more import ColorizedStderrHandlerfrom functools import wrapsimport warningscheck_path='.'path = os.p 阅读全文
posted @ 2022-03-11 12:18 我的博客16000 阅读(27) 评论(0) 推荐(0) 编辑
摘要: import jsonimport requestsfrom Common.Log_common import LOGhttp=requests.session()class Http_Requests(): def http_get(self,url,data,header):#get请求封装,两 阅读全文
posted @ 2022-03-11 12:16 我的博客16000 阅读(75) 评论(0) 推荐(0) 编辑
摘要: import osfrom Common.Log_common import LOG#封装一个循环方法class userLogin(): list1 = [] def login(self): with open('D:\\Pycharm\\MyApi_demo\\user.txt', encod 阅读全文
posted @ 2021-12-05 23:19 我的博客16000 阅读(30) 评论(0) 推荐(0) 编辑
摘要: #通过位置print '{0},{1}'.format('chuhao',20) print '{},{}'.format('chuhao',20) print '{1},{0},{1}'.format('chuhao',20) #通过关键字参数print '{name},{age}'.format 阅读全文
posted @ 2021-11-25 23:37 我的博客16000 阅读(22) 评论(0) 推荐(0) 编辑