首页 > 其他 > 详细

allure2 report+ jenkins 使用

时间:2018-07-27 22:48:32      阅读:316      评论:0      收藏:0      [点我收藏+]

物色了一个挺漂亮的报告生成插件 ——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/

allure2 report+ jenkins 使用

原文:https://www.cnblogs.com/mh1213/p/9379803.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!