allure--生成测试报告框架
使用方法: 在IDEA pom.xml文件中导入allure需要的安装包
<dependency>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-junit5</artifactId>
<version>RELEASE</version>
<scope>test</scope>
</dependency>
使用AllureReport生成测试报告: https://www.jianshu.com/p/b5a6e902c9d4 https://qualitysphere.github.io/4_allure/
Allure安装及使用:
https://blog.csdn.net/chenfei_5201213/article/details/80982929
https://dy.163.com/article/EFP7REG9053682XK.html;NTESwebSI=F81E81500BDCCADF411E7111E63008F2.hz-subscribe-web-docker-cm-online-rpqqn-8gfzd-flemn-cbf955bcpnq-8081
Allure注解:
@Epic(value = "")
@Feature:标注主要功能模块
@Story:标注Features功能模块下的分支功能
@Description:标注测试用例的描述
@Severity:标注测试用例的重要级别
点击底部窗口:Terminal 在窗口 执行全部的用例:mvn test
执行指定的用例:mvn test -Dtest=RandomTest (RandomTest为指定的测试用例类名)
执行:allure serve allure-results 在Terminal窗口输入:allure serve allure-results(allure-results报告名称,可以随便取)
输入此命令前需要安装好allure的环境:下载allure安装包到本地 allure配置环境变量:将allure安装包bin文件所在的路径 配置到系统环境变量path中:
变量名:path 变量值在最后添加:D:\software\allure-commandline-2.13.3\allure-2.13.3\bin (本地allure安装包bin文件所在的路径)
在cmd窗口输入allure出现打印信息 说明配置成功
Allure测试报告与Jenkins集成:
jenkins–Manage Jenkins–System configration–Global Tool configration下安装maven和allure
allure生产的测试报告乱码解决方法:
idea菜单栏File-->settings-->Editor-->Code Style-->File Encodings

再重新运行用例,生产测试报告,报告不会出现乱码问题

浙公网安备 33010602011771号