pytest
weixin_43047425
记录学习内容
展开
-
pytest_环境搭建
一、安装pytestpip install pytest二、插件安装2.1安装pytest-html(报告)pip install pytest-html2.2安装pytest-xdist(并行测试)pip install pytest-xdist2.3安装pytest-ordering(用例执行顺序)pip install pytest-ordering欢迎使用Markdown编辑器你好! 这是你第一次使用 Markdown编辑器 所展示的欢迎页。如果你想学习如何使用Markd原创 2020-06-11 15:12:10 · 345 阅读 · 0 评论 -
pytest_mark
@pytest.mark.P1 # 设置用例分类:P1@pytest.mark.run(order=1) # 执行顺序,第一个执行@pytest.mark.flaky(reruns=2, reruns_delay=1) # 失败重试2次,重试间隔1秒@pytest.mark.timeout(60) # 限定60s超时@pytest.mark.skip(‘不执行’) # 跳过当前用例,提示为“不执行”...原创 2020-07-13 14:45:16 · 202 阅读 · 0 评论