Open Li-Vincent opened 3 years ago
Run Results:
If I remove retryAnalyzer = DefaultRetryAnalyzer.class in @Test()
the result is ok.
@Li-Vincent - Here's what the documentation states in terms of configfailurepolicy
from here
Whether TestNG should continue to execute the remaining tests in the suite or skip them if an
@Before*
method fails. Default behavior isskip
.
Since your suite file is configured to continue, TestNG will ignore the @Beforex
method results and continue to execute the Tests.
TestNG is working as designed here.
There is a question here. Skip will be ignored only when RetryAnalyzer.class is added, but skip will not be ignored even if configfailurepolicy = continue when RetryAnalyzer is not used.
@krmahadevan It looks there is an undocumented side-effect on skipped status (or configfailurepolicy) when a retry analyzer is used. I think using a retry analyzer should not have impacts on the result (except some retrials) Thoughts?
@krmahadevan It looks there is an undocumented side-effect on skipped status (or configfailurepolicy) when a retry analyzer is used. I think using a retry analyzer should not have impacts on the result (except some retrials) Thoughts?
I am not sure @juherr Been super swamped at work and thanks to lockdowns again, juggling as a cook and as a maid as well :)
Haven't found time to look at this. I will squeeze in sometime over this weekend take this up and come back to you. Apologies for the delay in responding.
TestNG Version
v7.4.0
Expected behavior
skip test When BeforeMethod throw exception
Actual behavior
When BeforeMethod throw exception, the Test(With Retry Listener and driven by dataProvider) does not skip
Is the issue reproductible on runner?
Test case sample
Test Scripts:
RetryAnalyzer.java
TestXML set configfailurepolicy="continue"