【问题标题】:Testng RetryListener is not FAILING the test case after the maximum attemptTestng RetryListener 在最大尝试后没有失败测试用例
【发布时间】:2018-07-23 15:50:28
【问题描述】:

我通过这个链接http://www.seleniumeasy.com/testng-tutorials/execute-only-failed-test-cases-using-iretryanalyzer 使用了TestNG RetyListener,然后在testng.xml 中包含了监听器。

  1. 当作为 TestNG 套件运行测试用例时,它运行良好,并且在最大重试次数后测试标记为 FAILURE
选择环境:QA 以 FAILURE 状态重试 testcase1 1 次。 testcase1 跳过。 以 FAILURE 状态重试 testcase1 2 次。 testcase1 跳过。 以 FAILURE 状态重试 testcase1 3 次。 testcase1 跳过。 错误:testcase1 失败
  1. 当使用 maven 命令 (mvn clean test) 运行它时,在最大重试后测试被标记为已跳过,从而导致 Allure 报告生成问题
以 FAILURE 状态重试 testcase1 1 次。 testcase1 跳过。 以 FAILURE 状态重试 testcase1 2 次。 testcase1 跳过。 以 SKIP 状态重试 testcase1 3 次。

在使用 Maven 时需要帮助才能获得与 TestNG 相同的行为

【问题讨论】:

    标签: java maven selenium junit testng


    【解决方案1】:

    将您的 TestNG 依赖项更新到最新版本:

      <!-- https://mvnrepository.com/artifact/org.testng/testng -->
    <dependency>
        <groupId>org.testng</groupId>
        <artifactId>testng</artifactId>
        <version>6.14.3</version>
        <scope>test</scope>
    </dependency>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-08-04
      • 1970-01-01
      • 1970-01-01
      • 2020-06-04
      • 2018-12-31
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多