pytest生成测试报告-4种方法

 

1、生成resultlog文件     

 

 

2、生成JunitXML文件  

 

3、生成html测试报告

> pip install pytest-html     # 通过pip安装pytest-html

 

 

 4、生成allure测试报告

>pip install allure-pytest 安装allure库

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

配置环境变量:D:\allure-2.10.0\bin

输出allure报告 --alluredir=reports/allure

 在pycharm终端输入命令:allure serve reports\allure

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

posted @ 2019-04-25 11:25  测试媛S  阅读(10122)  评论(1编辑  收藏  举报