pytest+allure高端测试报告

1、下载jdk,搭建jdk环境

下载JDK  http://www.oracle.com/technetwork/java/javase/downloads/index.html 

2、下载allure

下载地址:https://github.com/allure-framework/allure2

下载之后解压进入bin目录,然后复制路径添加到PATH系统变量

 

 环境变量配置之后,cmd下运行allure(成功如下)

3、安装插件

pip install allure-pytest 
如果timeout就加   --index-url https://pypi.douban.com/simple  用豆瓣源

进入测试用例目录运行:
pytest --alluredir ./report(路径自行替换)

查看报告:
allure serve report(路径自行特换)

 
 

猜你喜欢

转载自www.cnblogs.com/yagao/p/12323269.html