![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
PYTEST
抽风同学
本博客更倾向于个人笔记
展开
-
Pytest的基础使用方法,fixture,失败重跑
注明此处使用版本为pytest 3.10.1(个人使用5.1.1有些问题)首先安装用pip安装即可pip install pytest==3.10.1安装完成后可以查看版本是否安装成功pytest --version然后安装完成后就是简单的入门小例子import pytestimport randomdef func(x): return x + 1...转载 2019-08-21 14:27:57 · 1337 阅读 · 0 评论 -
Pytest生成html测试报告,ALLURE报告
首先老样子安装库pip install pytest-html示例代码from selenium import webdriverimport randomimport pytestimport timeclass Test_restart(object): @pytest.fixture(scope="function", autouse=True) ...原创 2019-08-22 09:38:17 · 1230 阅读 · 0 评论 -
pytest运行报错,AttributeError: ‘Function‘ object has no attribute ‘get_marker解决方法
错误日志运行环境pytest版本5.1.1,pytest_remotedata版本0.21。经过测试当pytest版本为3.10.1时不会提示此错误信息。经过网上查了资料,大概是是pytest 4.6.1的时候改过此方法,而pytest_remotedata版本太低,未修正。所以更新下pytest_remotedata下就ok了...原创 2019-08-22 11:48:48 · 8311 阅读 · 4 评论