-
依赖安装:
# 安装allure-pytest pip3 install allure-pytest --index-url https://pypi.douban.com/simple # 请先卸载掉 pytest-allure-adaptor # 安装allure启动一个服务来读取报告 https://github.com/allure-framework/allure2/releases # 我这里安装的2.14 直接下载deb包然后安装 # 执行用例生成后会生成原始文件.json这个只是测试报告的原始文件,不能打开成html的报告 pytest --alluredir reults/ # 执行完成后pytest --alluredir report/,report目录会生成一个allure_raw的原始文件,这个只是测试报告的原始文件,不能打开成html的报告 # 这个时候需要启动allure服务器来读取对应的原始文件, sudo allure serve reults/
-
运行测试:
-
报告样式: