首页 > 其他分享 >allure+junit5遇到的一些问题

allure+junit5遇到的一些问题

时间:2022-09-01 20:22:15浏览次数:50  
标签:version 遇到 junit allure org junit5 aspectj

java+junit5+allure

之前引testng,还比较顺利,见上一篇博客,然后testng的注解和junit不一样,感觉junit5更好用一些,所以尝试java+junit5+allure

首先看allure官网,需要在pom.xml中引入包

文档:https://docs.qameta.io/allure#_testng

按照说明,引入后,出现莫名其妙的报错,发现把官网示例给的pom.xml删一些就好了(爆哭),特此记录

<aspectj.version>1.8.10</aspectj.version>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.7.1</version>
</dependency>
<dependency>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-junit5</artifactId>
<version>2.13.6</version>
<scope>test</scope>
</dependency>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M5</version>
<configuration>
<testFailureIgnore>false</testFailureIgnore>
<argLine>
-javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"
</argLine>
<systemProperties>
<property>
<name>allure.results.directory</name>
<value>./target/allure-results</value>
</property>
</systemProperties>
</configuration>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>${aspectj.version}</version>
</dependency>
</dependencies>
</plugin>

标签:version,遇到,junit,allure,org,junit5,aspectj
From: https://www.cnblogs.com/happiness30/p/16647729.html

相关文章