摘要: 插播:代码好工具 Jupyter Notebook 1. 概念: 时间复杂度与空间复杂度 时间复杂度:量化算法执行的操作/步骤的数量 用O(n)表示,例如:两层for循环就是O(n2)空间复杂度:变量占用空间的复杂度(占用内存次数) 阅读全文
posted @ 2023-07-11 11:06 躺云飘 阅读(21) 评论(0) 推荐(0) 编辑
摘要: 1.插件安装 jmeter4.0以上版本,如jmeter5.1.1版本的集成插件,只需要在官网下下载“plugins-manager.jar”包,放在jmeter安装路径的lib/ext目录下即可使用。 https://jmeter-plugins.org/install/Install/ 添加需要 阅读全文
posted @ 2021-04-07 19:01 躺云飘 阅读(222) 评论(0) 推荐(0) 编辑
摘要: json&&demjson区别 demjson可以解析不规则的json数据:如key为单引号的数据,还可以指定编码格式, 一般python解释器的编格式为unicode 直接用json去转换为json数据,但是demjson可以指定编码格式 如utf-8 解决中文乱码问题 import json i 阅读全文
posted @ 2021-02-09 13:25 躺云飘 阅读(2212) 评论(0) 推荐(0) 编辑
摘要: 1.@pytest.mark.parametrize()装饰范围 装饰类,则类中所有的测试用例都是用这组参数 装饰测试函数,只有被装饰的函数使用这组参数 2.@pytest.mark.parametrize() 装饰的三种方式 import pytest test_datas = [ (11, 22 阅读全文
posted @ 2020-06-20 20:47 躺云飘 阅读(195) 评论(0) 推荐(0) 编辑
摘要: 前言: 在使用多个断言时,第一个断言失败,程序会终止,不会执行后面的断言 思路一(正确):pytest-assume 1.pytest-assume pip install pytest-assume 实例 import pytest @pytest.mark.parametrize(('x', ' 阅读全文
posted @ 2020-06-17 14:18 躺云飘 阅读(994) 评论(0) 推荐(0) 编辑
摘要: 1.selenium 截图的四种方式 1. save_sreenshoot # 一般不用 坑多 2. get_sreenshoot_as_file # 保存网页截图 3. get_sreenshoot_as_png #获取二进制数据流 4.get_sreenshoot_as_base64 # bas 阅读全文
posted @ 2020-06-16 15:22 躺云飘 阅读(1703) 评论(0) 推荐(0) 编辑
摘要: 1.清空历史数据 --clean-alluredir pytest.main(['-s','-q','--alluredir','./report/allure_raw','--clean-alluredir']) #第一种方式 直接启动服务打开 os.popen('allure serve rep 阅读全文
posted @ 2020-06-15 23:44 躺云飘 阅读(879) 评论(0) 推荐(0) 编辑
摘要: 第一种方式:ids 1.参数化(pytest.mark.parametrize) # test_a.py import pytest import allure def login(username, password): '''登录''' print("输入账号:%s" % username) p 阅读全文
posted @ 2020-06-15 23:30 躺云飘 阅读(1239) 评论(0) 推荐(0) 编辑
摘要: 1.方式一: 测试用例中with allure.step(): # common_fucntion.py import allure import pytest ''' 流程性的用例,添加测试步骤,让用例更清晰 用例步骤:1.登陆, 2.浏览商品 3.添加购物车 4.生成订单 5.支付成功 ''' 阅读全文
posted @ 2020-06-15 18:22 躺云飘 阅读(5455) 评论(0) 推荐(0) 编辑
摘要: 1.allure用例描述 包含:epic,feature, story, title, testcase, issue, description, step, serverity, link, attachment 2.实例应用 import pytest import allure @pytest 阅读全文
posted @ 2020-06-15 17:13 躺云飘 阅读(944) 评论(0) 推荐(0) 编辑