allure报告

allure生成报告  添加测试步骤  添加测试描述  添加严重等级

1.生成xml(json)

pip install  pytest-allure-adaptor

ini文件中追加  --alluredir report

遇到 has no attribute ‘allure‘问题解决

cmd 执行 

 pip uninstall pytest-allure-adaptor

 pip install allure-pytest

 

2.xml转html

安装allure   D:\allure\bin 放到系统环境 path中  

重新打开一个命令行  allure  不报错说明安装成功

 

在report上级目录中执行命令  生成报告

allure generate report/ -o report/html --clean

allure在pycharm中还是提示不是内部或外部命令 用管理员打开pycharm

如果遇到index.html  用例数目是0  改用最新版本的allure

import allure导入报告

 

或者

@allure.severity("normal")【criatical  blocker minor  trivial】

 

posted @ 2022-03-01 09:21  血染星辰  阅读(189)  评论(0)    收藏  举报