how to get test exception in RetryAnalyzer

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

how to get test exception in RetryAnalyzer

sunny sachdeva
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

--
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: how to get test exception in RetryAnalyzer

Krishnan Mahadevan

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/

 

From: <[hidden email]> on behalf of sunny sachdeva <[hidden email]>
Reply-To: <[hidden email]>
Date: Friday, June 2, 2017 at 11:40 AM
To: testng-users <[hidden email]>
Subject: [testng-users] how to get test exception in RetryAnalyzer

 

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

--
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.

--
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: how to get test exception in RetryAnalyzer

sunny sachdeva
Thanks Krishnan this helped me a lot

On Friday, June 2, 2017 at 11:44:03 AM UTC+5:30, Krishnan wrote:

Maybe you could inspect <a href="https://jitpack.io/com/github/cbeust/testng/master-6.11-gc0bb558-111/javadoc/org/testng/ITestResult.html#getThrowable--" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fjitpack.io%2Fcom%2Fgithub%2Fcbeust%2Ftestng%2Fmaster-6.11-gc0bb558-111%2Fjavadoc%2Forg%2Ftestng%2FITestResult.html%23getThrowable--\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEXEk6Qe52IYUB0Yh4WQmEME8_j2w&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fjitpack.io%2Fcom%2Fgithub%2Fcbeust%2Ftestng%2Fmaster-6.11-gc0bb558-111%2Fjavadoc%2Forg%2Ftestng%2FITestResult.html%23getThrowable--\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEXEk6Qe52IYUB0Yh4WQmEME8_j2w&#39;;return true;">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 @ <a href="http://wakened-cognition.blogspot.com/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwakened-cognition.blogspot.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwakened-cognition.blogspot.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ&#39;;return true;">http://wakened-cognition.blogspot.com/

My Technical Scribbings @ <a href="http://rationaleemotions.wordpress.com/" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Frationaleemotions.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcBOKyRn0lpL8LDbBuyAlKdwgXwQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Frationaleemotions.wordpress.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEcBOKyRn0lpL8LDbBuyAlKdwgXwQ&#39;;return true;">http://rationaleemotions.wordpress.com/

 

From: <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="cKoH9ssEBQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">testng...@...> on behalf of sunny sachdeva <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="cKoH9ssEBQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">sunal...@...>
Reply-To: <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="cKoH9ssEBQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">testng...@...>
Date: Friday, June 2, 2017 at 11:40 AM
To: testng-users <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="cKoH9ssEBQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">testng...@...>
Subject: [testng-users] how to get test exception in RetryAnalyzer

 

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

--
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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="cKoH9ssEBQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">testng-users...@googlegroups.com.
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="cKoH9ssEBQAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">testng...@....
Visit this group at <a href="https://groups.google.com/group/testng-users" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/group/testng-users&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/group/testng-users&#39;;return true;">https://groups.google.com/group/testng-users.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.

--
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 [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.
Loading...