随笔分类 -  自动化的那些坑T.T

pytest fixture活学活用之 indirect
摘要:import pytest user_data = ["user1", "user2"] @pytest.fixture() def login(request): return request.param in user_data # 永远是True的判断 @pytest.mark.paramet 阅读全文

posted @ 2020-12-10 15:47 July落 阅读(264) 评论(0) 推荐(0)

pytest今日小坑,失败截图插附在allure报告中
摘要:今天又踩N多坑 1、我在testcase里头跑, if __name__ =="__main__": pytest.main(xxxxx) 怎么跑都跑不出来allure报告,明明代码是一样的 最后我跑到了根目录或者说,pytest检测不知道我是一个testcase的目录下,跑相同代码,出来报告了 可 阅读全文

posted @ 2020-12-09 19:28 July落 阅读(546) 评论(0) 推荐(0)

pytest 结合 allure 报告的环境配置
摘要:1、pip安装 allure-pytest pip install allure-pytest 2、下载allure 我电脑里装了npm了,所以直接在npm里装 npm install -g allure-commandline --save-dev 3、配置allure的环境变量 去环境变量里,配 阅读全文

posted @ 2020-12-08 18:42 July落 阅读(445) 评论(0) 推荐(0)

pytest.main() 学习笔记
摘要:import pytestpytest.main(["-n 3"]) # 3个进程并发执行,需要装 pytest-xdist 库pytest.main(["--collect-only"]) # 仅仅展示所有测试用例,不跑用例pytest.main(["--durations=1"]) # 显示耗时 阅读全文

posted @ 2020-12-08 15:04 July落 阅读(671) 评论(0) 推荐(0)

解决Original error: Could not proxy command to remote server. Original error: Error: socket hang up
摘要:appium连接手机做自动化,本来做的好好的。突然某一次开始一直报错这个socket hang up 我看网上有说uiautomator2的,又说uiautomator耗电严重,被手机自动杀的。都没解决我的问题 最后搞懂了我的起因: 上一次的调试链接没有主动断开,也即没有driver.quit()  阅读全文

posted @ 2020-11-27 12:13 July落 阅读(2060) 评论(0) 推荐(0)