1、生成resultlog文件     

SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。

 

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张

 

 

 

 

 

 

 

 

扫码关注我们
微信号:SRE实战
拒绝背锅 运筹帷幄