![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
selenium自动化
夜莺_Cody
这个作者很懒,什么都没留下…
展开
-
pytest框架学习(二) - pytest-html报告与fixture使用以及conftest.py文件
优化 - pytest - html 需要安装pytest - html插件 pytest可以生成多种样式的结果 1.生成 JunitXML 格式的测试报告: 命令: --junitxml=path 2.生成result log格式的测试报告: 命令: --resultlog=report\log.txt 3.生成html格式的测试报告: 命令: --html=report\test_o...原创 2019-07-02 23:20:09 · 838 阅读 · 0 评论 -
pytest框架学习(一) - pytest安装与mark功能
一.pytest 介绍 pytest:基于 unittest 之上的单元测试框架 1.自动发现测试模块和测试方法 2.断言使用 assert +表达式即可 3.可以设置会话级\模块级\类级\函数级fixtures 数据准备+清理工作 4.有丰富的插件库,目前在 600 个以上 安装命令 pip install pytest 安装 HTML 报告的插件 pip instal...原创 2019-06-26 23:14:21 · 2356 阅读 · 0 评论 -
pytest框架学习(三) - 测试用例
简单的登录用例: from pageObjects.index_page import IndexPage from testDatas import login_datas as ld import pytest @pytest.mark.login @pytest.mark.usefixtures("init_driver") class TestLogin(): # 正常场景...原创 2019-07-03 21:45:58 · 231 阅读 · 0 评论 -
pytest框架学习(四) - 重运行机制
pytest重运行机制 pytest提供了失败重运行机制 安装方法: pip install pytest-rerunfailures 使用方法: 命令行参数形式: 命令:pytest --reruns 重复次数 比如:pytest --reruns 2 表示:运行失败的用例可以重新运行2次 命令:pytest --reruns 重复次数 --reruns-delay 次数之间...原创 2019-07-03 22:33:43 · 815 阅读 · 0 评论