英文:
Does Allure support Cucumber JVM 6.0.0?
问题
我有一个使用Java 8和Cucumber 6.0.0的项目。我尝试按照https://docs.qameta.io/allure/#_cucumber_jvm的说明进行操作,但是没有可用的io.qameta.allure:allure-cucumber6-jvm
JAR文件。之前版本的io.qameta.allure:allure-cucumber????-jvm
与Cucumber 6.0.0不兼容。
是否有一种方法将Allure集成到Cucumber 6.0.0中?
英文:
I have a project that uses Java 8 and Cucumber 6.0.0. I've tried to follow https://docs.qameta.io/allure/#_cucumber_jvm, however, there is no io.qameta.allure:allure-cucumber6-jvm
JAR available. Previous versions of io.qameta.allure:allure-cucumber????-jvm
don't work with Cucumber 6.0.0.
Is there a way how to integrate Allure with Cucumber 6.0.0?
答案1
得分: 0
根据我的研究和知识,根据每个版本的cucumber,Allure附带不同的依赖,比如allure-cucumber2-jvm、allure-cucumber3-jvm、allure-cucumber4-jvm、allure-cucumber5-jvm。
目前为止,你不会看到cucumber6的任何依赖。但很快你会得到它。cucumber 6发布仅仅过去了3个月。
英文:
As per my research and knowledge, Allure comes with different dependencies for each version of cucumber like allure-cucumber2-jvm, allure-cucumber3-jvm, allure-cucumber4-jvm, allure-cucumber5-jvm.
As of now you won't see any dependency for cucumber6. But you will get it soon. It's been only 3 months of releasing cucumber 6
答案2
得分: 0
是的,在 pom.xml 文件中下载以下 allure 依赖项:
<!-- https://mvnrepository.com/artifact/io.qameta.allure/allure-cucumber6-jvm -->
<dependency>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-cucumber6-jvm</artifactId>
<version>2.13.6</version>
</dependency>
然后在 surefire 插件配置中使用它:
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-surefire-plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M5</version>
<configuration>
<suiteXmlFiles>
<suiteXmlFile>testng.xml</suiteXmlFile>
</suiteXmlFiles>
<systemProperties>
<property>
<name>allure.results.directory</name>
<value>${project.build.directory}/allure-results</value>
</property>
<property>
<name>allure.link.issue.pattern</name>
<value>https://example.org/issue/{}</value>
</property>
<property>
<name>allure.link.tms.pattern</name>
<value>https://example.org/tms/{}</value>
</property>
</systemProperties>
<testFailureIgnore>true</testFailureIgnore>
<argLine>
-javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"
-Dcucumber.plugin="io.qameta.allure.cucumber6jvm.AllureCucumber6Jvm"
</argLine>
</configuration>
<dependencies>
<!-- https://mvnrepository.com/artifact/org.aspectj/aspectjweaver -->
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>${aspectj.version}</version>
</dependency>
</dependencies>
</plugin>
您还需要更新 aspectj 依赖项并将其定义为属性。今天尝试了一下,效果很好。
英文:
yes, in the pom.xml download the following allure dependency:
<!-- https://mvnrepository.com/artifact/io.qameta.allure/allure-cucumber6-jvm -->
<dependency>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-cucumber6-jvm</artifactId>
<version>2.13.6</version>
</dependency>
</dependencies>
then in surefire plugin config to use it:
<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-surefire-plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M5</version>
<configuration>
<suiteXmlFiles>
<suiteXmlFile>testng.xml</suiteXmlFile>
</suiteXmlFiles>
<systemProperties>
<property>
<name>allure.results.directory</name>
<value>${project.build.directory}/allure-results</value>
</property>
<property>
<name>allure.link.issue.pattern</name>
<value>https://example.org/issue/{}</value>
</property>
<property>
<name>allure.link.tms.pattern</name>
<value>https://example.org/tms/{}</value>
</property>
</systemProperties>
<testFailureIgnore>true</testFailureIgnore>
<argLine>
-javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"
-Dcucumber.plugin="io.qameta.allure.cucumber6jvm.AllureCucumber6Jvm"
</argLine>
</configuration>
<dependencies>
<!-- https://mvnrepository.com/artifact/org.aspectj/aspectjweaver -->
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>${aspectj.version}</version>
</dependency>
</dependencies>
</plugin>
you also need to update aspectj dependency and define it as a property.
tried today and it was working.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论