allure2 report+ jenkins 使用

本文介绍如何使用Allure报告生成插件,包括添加依赖、配置Maven和Jenkins步骤,并提供Allure2框架使用文档链接。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

物色了一个挺漂亮的报告生成插件 ——allure。

下面介绍一下这个报告的使用。

 

1. 添加依赖

 

 1 <dependencies>  
 2 <!-- https://mvnrepository.com/artifact/io.qameta.allure/allure-testng -->
 3         <dependency>
 4             <groupId>io.qameta.allure</groupId>
 5             <artifactId>allure-testng</artifactId>
 6             <version>2.6.0</version>
 7         </dependency>
 8 </dependencies>
 9 
10 <build>
11         <plugins>
12             <plugin>
13                 <groupId>org.apache.maven.plugins</groupId>
14                 <artifactId>maven-surefire-plugin</artifactId>
15                 <version>2.20.1</version>
16                 <configuration>
17                     <systemPropertyVariables>
18                         <org.uncommons.reportng.escape-output>false</org.uncommons.reportng.escape-output>
19                     </systemPropertyVariables>
20                     <testFailureIgnore>true</testFailureIgnore>
21                     <argLine>-javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"23                     </argLine>
24                     <suiteXmlFiles>
25                         <suiteXmlFile>testng.xml</suiteXmlFile>
26                     </suiteXmlFiles>
27                 </configuration>
28                 <dependencies>
29                     <!-- https://mvnrepository.com/artifact/org.aspectj/aspectjweaver -->
30                     <dependency>
31                         <groupId>org.aspectj</groupId>
32                         <artifactId>aspectjweaver</artifactId>
33                         <version>${aspectj.version}</version>
34                     </dependency>
35                 </dependencies>
36             </plugin>
37           <plugins>
38    <build>         

 

 

在jenkins中搜索安装allure-report插件

 

登录jenkins ——系统设置——管理插件。

在过滤中输入allure

我安装的2.26版本。

 

到构建项目中的配置中。

 

 

在全局工具配置添加Allure Commandline

 

 

 

构建后出来的报告:

附上allure2 框架使用文档

https://docs.qameta.io/allure/2.0/

转载于:https://www.cnblogs.com/mh1213/p/9379803.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值