Maven Surefire不会重新运行失败的testng测试,什么';我的配置有什么问题?

Maven Surefire不会重新运行失败的testng测试,什么';我的配置有什么问题?,maven,testng,maven-surefire-plugin,Maven,Testng,Maven Surefire Plugin,我是surefire插件的新手,正在尝试重新运行flaky测试 我的配置如下: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>3.0.0-M2</vers

我是surefire插件的新手,正在尝试重新运行flaky测试

我的配置如下:

            <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>3.0.0-M2</version>
            <configuration>
                <suiteXmlFiles>
                    <suiteXmlFile>${suiteXmlFile}</suiteXmlFile>
                </suiteXmlFiles>
                <rerunFailingTestsCount>1</rerunFailingTestsCount>
            </configuration>
        </plugin>
我得到:

[ERROR] Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 11.12 s <<< FAILURE! - in TestSuite

[ERROR] ieTest1(com.mycompany.testcases.Sample.independentTest)  Time elapsed: 3.839 s  <<< FAILURE!

java.lang.AssertionError: expected [true] but found [false]
[错误]测试运行:2,失败:1,错误:0,跳过:0,经过的时间:11.12秒自3.0.0-M4以来,支持“重新运行”功能,请参阅

有关更多详细信息,请参阅以下Jiras:

不要使用forkCount=0。在非琐碎的项目中,它通常是无用的

干杯 Tibor17

根据,从3.0.0-M4开始,ReRunningTestScont仅适用于JUnit 4+提供程序和JUnit 5+提供程序,而不适用于TestNG


我也在调查这个问题,到目前为止最完整的解释似乎是:

如果你的测试真的有问题,请修复它们…这是唯一的解决方案…不重复它们…我不拥有这些测试。我来自支持自动化运行的基础架构团队。你应该联系开发人员,让他们解决问题……检查
target/surefire报告
是否有输出?是的,我收到了surefire报告。关于@DisplayName,你可能希望在细粒度配置级别启用它们,请参阅我们计划中的TestNG。
[ERROR] Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 11.12 s <<< FAILURE! - in TestSuite

[ERROR] ieTest1(com.mycompany.testcases.Sample.independentTest)  Time elapsed: 3.839 s  <<< FAILURE!

java.lang.AssertionError: expected [true] but found [false]