testng skips dependency tests when dependent test passed on retry

166 views
Skip to first unread message

shankar KC

unread,
Sep 21, 2012, 5:08:54 AM9/21/12
to testn...@googlegroups.com
Hi all,
 I have 2 tests. TestA and testB
TestA -> fails firsttime and passes on retry
TestB dependent on TestA using dependsOnMethods = "testA" attribute. 
TestA uses retry analyzer @Test(retryAnalyzer = RetryAnalyzer.class) so that it can be rerun on failure.

Now the current behavior as below :-
1. TestA fails for 1st attempt and get retried.
2. TestA passes in 2nd attempt.
3. TestB marked as skipped.

I would expect TestB not to get skipped as latest result of testA is pass.
I have attached source code here to repro the same. Please let me know how to make testB run on retry. I dont want it to get marked as skipped.
Thanks
Shankar KC

TestNGTests.zip

shankar KC

unread,
Sep 23, 2012, 11:48:30 PM9/23/12
to testn...@googlegroups.com
updated...Now i can rerun the dependent tests. I just delete the result that failed earlier. But still test suite reports the run as failed. Is there a way to remove the result from test suite as well ?
Thanks
Shankar KC
Reply all
Reply to author
Forward
0 new messages