Allure安装及使用

Allure是一个独立的报告插件,生成美观易读的报告

在Python3版本中,安装Allure方法:    

打开cmd,输入pip install allure-pytest即安装好了。

报告转html工具安装

allure-2.6.0.zip已经下载了,放在了E:progromesallure-2.7.0这个目录下

将压缩包内的bin目录配置到path系统环境变量

在项目的使用

1, 配置文件中,

addopts = -s --alluredir=./report --reruns 0

2,进入report上级目录,即点击一下你的项目名,在Terminal中执行命令  

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

等3秒左右,在提示下,输入pytest

 

结果    report目录下会生成index.html文件,即为可视化报告

原文地址:https://www.cnblogs.com/noon-12/p/12655438.html