how can I run testng-failed.xml via Jenkins or any other means automatically if some of my test case failed

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

how can I run testng-failed.xml via Jenkins or any other means automatically if some of my test case failed

SeleniumQA
Hi Guys, 

Please help me in re-running the testNg-failed.xml automatically via Jenkins or any other mean if test cases are getting failed.

--
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 http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: how can I run testng-failed.xml via Jenkins or any other means automatically if some of my test case failed

Krishnan Mahadevan
There are multiple ways in which you can re-run failed tests.

1. Use a retry analyzer and implement the retry running of tests using this.
2. In CI systems such as Jenkins, you have the option of adding a post build step wherein you can write up a simple shell script which basically checks if there is a testng-failed.xml file available in the test output path and if it is available then kick off the build [ by running either the ant task or the maven task ] by providing the suite file to be executed as testng-failed.xml


Note:
Approach 2 is going to be messing up your test results (if you are dependent on the default reports that TestNG provides) because it would get overwritten. So you may have to put in additional checks in those areas as well.

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/


On Fri, Aug 15, 2014 at 11:52 PM, SeleniumQA <[hidden email]> wrote:
Hi Guys, 

Please help me in re-running the testNg-failed.xml automatically via Jenkins or any other mean if test cases are getting failed.

--
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 http://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 http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: how can I run testng-failed.xml via Jenkins or any other means automatically if some of my test case failed

SeleniumQA
This post was updated on .
Thanks Krishna, Could you please provide any blog reference if you are
aware of, thanks.