selenium+pytest+allure报告
本地pytest+allure报告
-
安装python依赖库
pip install pytest==4.0.2 指定版本,装4.4.1执行用例报错
pytest pluggy.manager.PluginValidationError: unknown hook 'pytest_namespace'报错处理办法
https://github.com/nucypher/nucypher/issues/649
pip install pytest-allure-adaptor pytest-rerunfailures pytest-html
-
allure安装
https://github.com/allure-framework/allure2/releases/tag/2.10.0 Links下的download,下载allure-commandline-2.10.0.zip,下载解压然后将bin目录添加到环境变量path即可。
D:\allure\bin
- 生成allure html报告
D:\work\qiekj-ui-autotest> 执行测试用例:
pytest -s -q --alluredir [xml_report_path]
//[xml_report_path]根据自己需要定义文件夹,我定义为:/report ,在report文件夹下生成.xml文件
cmd,在report路径下,运行命令,allure serve report,本地可查看allure报告

浙公网安备 33010602011771号