物色了一個挺漂亮的報告生成插件 ——allure。java
下面介紹一下這個報告的使用。apache
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插件maven
登陸jenkins ——系統設置——管理插件。工具
在過濾中輸入allureui
我安裝的2.26版本。url
到構建項目中的配置中。spa
在全局工具配置添加Allure Commandline.net
構建後出來的報告:插件
附上allure2 框架使用文檔