使用mvn命令运行时,黄瓜重新运行插件未在提供的路径上记录失败测试

问题描述

以下是Junit黄瓜功能测试仪。所有黄瓜功能部件均具有junit跑步者类,如下所示:

@RunWith(Cucumber.class)
@CucumberOptions(
        features = "src/test/resources/feature/afm/endpoints/afm-endpoints.feature",glue={"org.xyz.abc.qalibs.stepdefs"},plugin= {"rerun:rerun/failed_scenarios.txt"} 
        )
public class AFMEndpointRunTest{

}

下面是重新运行测试Junit跑步者类

@RunWith(Cucumber.class)
@CucumberOptions(
        features = {"@rerun/failed_scenarios.txt",},monochrome = true
)

public class ReRunTestRunner {

}

我正在使用下面的maven命令运行测试

mvn clean test -Dcucumber.options='--tags @smoke @regression'

回归很好。但是,如果有任何测试失败,则不会将其保存到failed_scenarios.txt。 但是如果以->以Junit的身份在本地运行任何失败的测试,则其已保存到fail_scenarios.txt。

下面是我的pom.xml黄瓜依赖项:

<dependency>
    <groupId>info.cukes</groupId>
    <artifactId>cucumber-java</artifactId>
    <version>1.2.5</version>
</dependency>

<dependency>
    <groupId>info.cukes</groupId>
    <artifactId>cucumber-junit</artifactId>
    <version>1.2.5</version>
</dependency>

<dependency>
    <groupId>info.cukes</groupId>
    <artifactId>gherkin</artifactId>
    <version>2.12.2</version>
</dependency>
<dependency>
    <groupId>junit</groupId>
    <artifactId>junit</artifactId>
    <version>4.12</version>
</dependency>

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)