Allure测试报告

1,366 阅读1分钟

测试报告 Allure测试报告工具

1.配置 1.1 安装pytest-allure-adaptor工具

pip install pytest-allure-adaptor

1.2配置allure工具

E\tools

Bin目录添加到系统环境变量 path E:\tools\allure-2.7.0\bin

2.使用 2.1 写脚本 Pytest规则写项目代码 2.2 生成xml文件 语法调用 pytest --alluredir[目录名] Pytest --allurdir report 可以换成其它

调用的时候直接调用pytest即可 配置到ini

2.3 执行命令 xml转成html 两种:一种是临时的 一种是最终的

allure generate report -o report/html --clean 【report】xml存放的目录 【-o】:构建 【abc/html】:存放目录 【--clean】:把上一次清空 生成当前次的html

============================================= 说明:如果生成了空的report里面没有xml 【需要按pytest规则编写脚本】