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

 

1、生成resultlog文件     

 

pytest生成测试报告-4种方法_第1张图片

pytest生成测试报告-4种方法_第2张图片

 

2、生成JunitXML文件  

pytest生成测试报告-4种方法_第3张图片

pytest生成测试报告-4种方法_第4张图片

 

3、生成html测试报告

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

pytest生成测试报告-4种方法_第5张图片

pytest生成测试报告-4种方法_第6张图片

 

 

 4、生成allure测试报告

>pip install allure-pytest 安装allure库

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

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

pytest生成测试报告-4种方法_第7张图片

 

 

 

 

 

 

 

 

转载于:https://www.cnblogs.com/sophia-985935365/p/10767311.html

你可能感兴趣的:(pytest生成测试报告-4种方法)