how to get test exception in RetryAnalyzer

14 views
Skip to first unread message

sunny sachdeva

unread,
Jun 2, 2017, 2:10:51 AM6/2/17
to testng-users
I have a class RetryAnalyzer which extends IRetryAnalyzer. it has a method retry which accepts ITestResult result.

Now i want to know how can I get test status exception or type of exception when test case is failed. Idea is to retry a test case only when exception arises from selenium and not testNG.

Please let me know if some knows it,

Thanks
Sunny Sachdeva

Krishnan Mahadevan

unread,
Jun 2, 2017, 2:14:03 AM6/2/17
to testng...@googlegroups.com

Maybe you could inspect ITestResult.getThrowable() and see if that helps?

 

Thanks & Regards

Krishnan Mahadevan

 

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"

My Scribblings @ http://wakened-cognition.blogspot.com/

My Technical Scribbings @ http://rationaleemotions.wordpress.com/

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to testng-users...@googlegroups.com.
To post to this group, send email to testng...@googlegroups.com.
Visit this group at https://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.

sunny sachdeva

unread,
Jun 5, 2017, 1:36:23 AM6/5/17
to testng-users
Thanks Krishnan this helped me a lot
Reply all
Reply to author
Forward
0 new messages