我通过以下链接http://www.seleniumeasy.com/testng-tutorials/execute-only-failed-test-cases-using-iretryanalyzer使用了TestNG RetyListener,然后将侦听器包含在testng.xml中。
Selected environment: QA Retrying test testcase1 with status FAILURE for the 1 time(s). testcase1 skipped. Retrying test testcase1 with status FAILURE for the 2 time(s). testcase1 skipped. Retrying test testcase1 with status FAILURE for the 3 time(s). testcase1 skipped. ERROR: testcase1 has failed
Retrying test testcase1 with status FAILURE for the 1 time(s). testcase1 skipped. Retrying test testcase1 with status FAILURE for the 2 time(s). testcase1 skipped. Retrying test testcase1 with status SKIP for the 3 time(s).
在使用Maven时需要获得与TestNG相同的行为的帮助
答案 0 :(得分: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>