随笔分类 - python
摘要:1、安装Flask pip install Flask from flask import Flaskapp = Flask(__name__)@app.route("/index1")def hello(): return "hello world!"@app.route("/python")de
阅读全文
摘要:1、一个参数传值 @pytest.mark.parametrize("a", [3,6,9])def test_a(self,a): print("test data:a=%d"%a) assert a%3 ==0 2、多个参数传值 @pytest.mark.parametrize("a,b",[(
阅读全文
摘要:1、安装pytest pip install pytest 2、发现用例规则 3、运行方式 4、运行参数 5、pytest框架结构 6、fixture for example: import pytestdef add(x,y): return x + ydef test_add(): assert
阅读全文
摘要:Android环境: 1 安装Python3 2 安装Pycharm,安装AirtestIDE 3 安装adb IOS环境: 1 下载webDriverAgent, 编译 (安装homebrew) 2 同Android Step 1、2、5 3 安装python3.6 MAC安装ADB: ①安装ho
阅读全文
摘要:1、处理一个excel基本方法 单独写一个handle_excel.py from xlutils.copy import copy import xlrd class HandleExcel: def __init__(self,file='D:\\Users\\wqa\\Desktop\\dem
阅读全文
摘要:1、传入json串 2、json化 jdata = json.dumps(payload) response = requests.request("POST", url, headers=headers, data=jdata)
阅读全文
摘要:一:验证接口返回值 self.assertEqual(a,b,msg=msg) #判断a与1.b是否一致,msg类似备注,可以为空 self.assertNotEqual(a,b,msg=msg) #判断a与b是否不一致 self.assertTrue(a,msg=none) #判断a是否为True
阅读全文
摘要:1、安装requests pip install requests 2、从postman导出格式 3、写接口文件 4、返回值,json处理 response = requests.request("POST", url, headers=headers, data = payload)detaili
阅读全文
摘要:1、git.exe 2、adb.exe 将adb.exe 拷贝到 Git/usr/bin 下就行了
阅读全文
浙公网安备 33010602011771号