|
|
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. I did post the same question in testNG-DEV. I havnt received any reply yet. May be they are bit busy as lot of people will request answers to their questions. I think this is a common problem and many might have faced it and found some solution already. So i am posting my question here aswell. Thanks Shankar KC
--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/testng-users/-/bdSdkxFVXTYJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en.
|
|
Shankar, What version of TestNG were you using? How are you running your tests?
Perhaps you might wanna include this info as well! On Sunday, September 23, 2012, shankar KC wrote:
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. I did post the same question in testNG-DEV. I havnt received any reply yet. May be they are bit busy as lot of people will request answers to their questions. I think this is a common problem and many might have faced it and found some solution already. So i am posting my question here aswell.
Thanks Shankar KC
--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/testng-users/-/bdSdkxFVXTYJ.
To post to this group, send email to <a href="javascript:_e({}, 'cvml', 'testng-users@googlegroups.com');" target="_blank">testng-users@....
To unsubscribe from this group, send email to <a href="javascript:_e({}, 'cvml', 'testng-users%2Bunsubscribe@googlegroups.com');" target="_blank">testng-users+unsubscribe@....
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en.
-- 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/
--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en.
|
|
I am using Latest version of testNG. testNG 6.8 I am running test using eclipse testNG plugin. Thanks Shankar KC On Sunday, September 23, 2012 6:50:29 PM UTC+5:30, Krishnan wrote: Shankar,What version of TestNG were you using? How are you running your tests?
Perhaps you might wanna include this info as well! On Sunday, September 23, 2012, shankar KC wrote:
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. I did post the same question in testNG-DEV. I havnt received any reply yet. May be they are bit busy as lot of people will request answers to their questions. I think this is a common problem and many might have faced it and found some solution already. So i am posting my question here aswell.
Thanks Shankar KC
--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/testng-users/-/bdSdkxFVXTYJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to testng-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en.
-- 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/
--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/testng-users/-/jwa0CiexOrYJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en.
|
|
Now I am able to run the skipped test with this approach. Now the tests that are dependent are running but i still see that test suite reports that tests failed. @Override public boolean retry(ITestResult result) { if (count < maxCount) { result.setStatus(ITestResult.SKIP); // we set the status to skipped and remove this result so that on rerun if we have dependency it uses latest result. result.getTestContext().getSkippedTests().removeResult(result.getMethod()); count++; return true; } return false;
} Though testNG shows all tests passed overall testsuite result showing suite as failure. It shows first iteration failure as failure exception. I have attached an image showing that. Any pointers to resolve the issue appreciated. Thanks Shankar KC
On Sunday, September 23, 2012 8:40:47 PM UTC+5:30, shankar KC wrote: I am using Latest version of testNG. testNG 6.8 I am running test using eclipse testNG plugin.Thanks Shankar KC On Sunday, September 23, 2012 6:50:29 PM UTC+5:30, Krishnan wrote: Shankar,What version of TestNG were you using? How are you running your tests?
Perhaps you might wanna include this info as well! On Sunday, September 23, 2012, shankar KC wrote:
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. I did post the same question in testNG-DEV. I havnt received any reply yet. May be they are bit busy as lot of people will request answers to their questions. I think this is a common problem and many might have faced it and found some solution already. So i am posting my question here aswell.
Thanks Shankar KC
--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/testng-users/-/bdSdkxFVXTYJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to testng-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en.
-- 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/
--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/testng-users/-/x6HGe1VrVT0J.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en.
|
|
I tried your solution to run the dependent testcases but it didnt work for me can you please help me. On Monday, September 24, 2012 at 9:00:29 AM UTC+5:30, shankar KC wrote: Now I am able to run the skipped test with this approach. Now the tests that are dependent are running but i still see that test suite reports that tests failed. @Override public boolean retry(ITestResult result) { if (count < maxCount) { result.setStatus(ITestResult.SKIP); // we set the status to skipped and remove this result so that on rerun if we have dependency it uses latest result. result.getTestContext().getSkippedTests().removeResult(result.getMethod()); count++; return true; } return false;
} Though testNG shows all tests passed overall testsuite result showing suite as failure. It shows first iteration failure as failure exception. I have attached an image showing that. Any pointers to resolve the issue appreciated. Thanks Shankar KC
On Sunday, September 23, 2012 8:40:47 PM UTC+5:30, shankar KC wrote: I am using Latest version of testNG. testNG 6.8 I am running test using eclipse testNG plugin.Thanks Shankar KC On Sunday, September 23, 2012 6:50:29 PM UTC+5:30, Krishnan wrote: Shankar,What version of TestNG were you using? How are you running your tests?
Perhaps you might wanna include this info as well! On Sunday, September 23, 2012, shankar KC wrote:
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. I did post the same question in testNG-DEV. I havnt received any reply yet. May be they are bit busy as lot of people will request answers to their questions. I think this is a common problem and many might have faced it and found some solution already. So i am posting my question here aswell.
Thanks Shankar KC
--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To view this discussion on the web visit <a href="https://groups.google.com/d/msg/testng-users/-/bdSdkxFVXTYJ" target="_blank" rel="nofollow" onmousedown="this.href='https://groups.google.com/d/msg/testng-users/-/bdSdkxFVXTYJ';return true;" onclick="this.href='https://groups.google.com/d/msg/testng-users/-/bdSdkxFVXTYJ';return true;">https://groups.google.com/d/msg/testng-users/-/bdSdkxFVXTYJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to testng-users+unsubscribe@googlegroups.com.
For more options, visit this group at <a href="http://groups.google.com/group/testng-users?hl=en" target="_blank" rel="nofollow" onmousedown="this.href='http://groups.google.com/group/testng-users?hl\75en';return true;" onclick="this.href='http://groups.google.com/group/testng-users?hl\75en';return true;">http://groups.google.com/group/testng-users?hl=en.
-- 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='http://www.google.com/url?q\75http%3A%2F%2Fwakened-cognition.blogspot.com%2F\46sa\75D\46sntz\0751\46usg\75AFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwakened-cognition.blogspot.com%2F\46sa\75D\46sntz\0751\46usg\75AFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ';return true;">http://wakened-cognition.blogspot.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 [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.
|
|
Let me know the issue you are facing. I will help. I will try to send accross code i wrote. It works for me.... Once i reach office i will update.
On May 28, 2015 9:14 PM, "soravikr" < [hidden email]> wrote: I tried your solution to run the dependent testcases but it didnt work for me can you please help me. On Monday, September 24, 2012 at 9:00:29 AM UTC+5:30, shankar KC wrote: Now I am able to run the skipped test with this approach. Now the tests that are dependent are running but i still see that test suite reports that tests failed. @Override public boolean retry(ITestResult result) { if (count < maxCount) { result.setStatus(ITestResult.SKIP); // we set the status to skipped and remove this result so that on rerun if we have dependency it uses latest result. result.getTestContext().getSkippedTests().removeResult(result.getMethod()); count++; return true; } return false;
} Though testNG shows all tests passed overall testsuite result showing suite as failure. It shows first iteration failure as failure exception. I have attached an image showing that. Any pointers to resolve the issue appreciated. Thanks Shankar KC
On Sunday, September 23, 2012 8:40:47 PM UTC+5:30, shankar KC wrote: I am using Latest version of testNG. testNG 6.8 I am running test using eclipse testNG plugin.Thanks Shankar KC On Sunday, September 23, 2012 6:50:29 PM UTC+5:30, Krishnan wrote: Shankar,What version of TestNG were you using? How are you running your tests?
Perhaps you might wanna include this info as well! On Sunday, September 23, 2012, shankar KC wrote:
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. I did post the same question in testNG-DEV. I havnt received any reply yet. May be they are bit busy as lot of people will request answers to their questions. I think this is a common problem and many might have faced it and found some solution already. So i am posting my question here aswell.
Thanks Shankar KC
--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/testng-users/-/bdSdkxFVXTYJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en.
-- 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/
--
You received this message because you are subscribed to a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/testng-users/WMNZ5uzM6DE/unsubscribe.
To unsubscribe from this group and all its topics, 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.
|
|
Even though a testcase passes in retry its dependent testcases are skipped.As you mentioned I made the result of the testcase skip and removed from the results even then the dependent testcase skips. On Friday, May 29, 2015 at 9:03:17 AM UTC+5:30, shankar KC wrote: Let me know the issue you are facing. I will help. I will try to send accross code i wrote. It works for me.... Once i reach office i will update.
On May 28, 2015 9:14 PM, "soravikr" <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="bW0ZtpJvKegJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">r.sow...@...> wrote: I tried your solution to run the dependent testcases but it didnt work for me can you please help me. On Monday, September 24, 2012 at 9:00:29 AM UTC+5:30, shankar KC wrote: Now I am able to run the skipped test with this approach. Now the tests that are dependent are running but i still see that test suite reports that tests failed. @Override public boolean retry(ITestResult result) { if (count < maxCount) { result.setStatus(ITestResult.SKIP); // we set the status to skipped and remove this result so that on rerun if we have dependency it uses latest result. result.getTestContext().getSkippedTests().removeResult(result.getMethod()); count++; return true; } return false;
} Though testNG shows all tests passed overall testsuite result showing suite as failure. It shows first iteration failure as failure exception. I have attached an image showing that. Any pointers to resolve the issue appreciated. Thanks Shankar KC
On Sunday, September 23, 2012 8:40:47 PM UTC+5:30, shankar KC wrote: I am using Latest version of testNG. testNG 6.8 I am running test using eclipse testNG plugin.Thanks Shankar KC On Sunday, September 23, 2012 6:50:29 PM UTC+5:30, Krishnan wrote: Shankar,What version of TestNG were you using? How are you running your tests?
Perhaps you might wanna include this info as well! On Sunday, September 23, 2012, shankar KC wrote:
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. I did post the same question in testNG-DEV. I havnt received any reply yet. May be they are bit busy as lot of people will request answers to their questions. I think this is a common problem and many might have faced it and found some solution already. So i am posting my question here aswell.
Thanks Shankar KC
--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To view this discussion on the web visit <a href="https://groups.google.com/d/msg/testng-users/-/bdSdkxFVXTYJ" rel="nofollow" target="_blank" onmousedown="this.href='https://groups.google.com/d/msg/testng-users/-/bdSdkxFVXTYJ';return true;" onclick="this.href='https://groups.google.com/d/msg/testng-users/-/bdSdkxFVXTYJ';return true;">https://groups.google.com/d/msg/testng-users/-/bdSdkxFVXTYJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to testng-users+unsubscribe@googlegroups.com.
For more options, visit this group at <a href="http://groups.google.com/group/testng-users?hl=en" rel="nofollow" target="_blank" onmousedown="this.href='http://groups.google.com/group/testng-users?hl\75en';return true;" onclick="this.href='http://groups.google.com/group/testng-users?hl\75en';return true;">http://groups.google.com/group/testng-users?hl=en.
-- 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/" rel="nofollow" target="_blank" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwakened-cognition.blogspot.com%2F\46sa\75D\46sntz\0751\46usg\75AFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwakened-cognition.blogspot.com%2F\46sa\75D\46sntz\0751\46usg\75AFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ';return true;">http://wakened-cognition.blogspot.com/
--
You received this message because you are subscribed to a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit <a href="https://groups.google.com/d/topic/testng-users/WMNZ5uzM6DE/unsubscribe" target="_blank" rel="nofollow" onmousedown="this.href='https://groups.google.com/d/topic/testng-users/WMNZ5uzM6DE/unsubscribe';return true;" onclick="this.href='https://groups.google.com/d/topic/testng-users/WMNZ5uzM6DE/unsubscribe';return true;">https://groups.google.com/d/topic/testng-users/WMNZ5uzM6DE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="bW0ZtpJvKegJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">testng-users...@googlegroups.com.
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="bW0ZtpJvKegJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">testng...@....
Visit this group at <a href="http://groups.google.com/group/testng-users" target="_blank" rel="nofollow" onmousedown="this.href='http://groups.google.com/group/testng-users';return true;" onclick="this.href='http://groups.google.com/group/testng-users';return true;">http://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='https://groups.google.com/d/optout';return true;" onclick="this.href='https://groups.google.com/d/optout';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 http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.
|
|
Hi Shankar,
Thanks for you reply.your solution worked...Thank you so much :) On Friday, May 29, 2015 at 9:41:55 AM UTC+5:30, soravikr wrote: Even though a testcase passes in retry its dependent testcases are skipped.As you mentioned I made the result of the testcase skip and removed from the results even then the dependent testcase skips. On Friday, May 29, 2015 at 9:03:17 AM UTC+5:30, shankar KC wrote: Let me know the issue you are facing. I will help. I will try to send accross code i wrote. It works for me.... Once i reach office i will update.
On May 28, 2015 9:14 PM, "soravikr" < [hidden email]> wrote: I tried your solution to run the dependent testcases but it didnt work for me can you please help me. On Monday, September 24, 2012 at 9:00:29 AM UTC+5:30, shankar KC wrote: Now I am able to run the skipped test with this approach. Now the tests that are dependent are running but i still see that test suite reports that tests failed. @Override public boolean retry(ITestResult result) { if (count < maxCount) { result.setStatus(ITestResult.SKIP); // we set the status to skipped and remove this result so that on rerun if we have dependency it uses latest result. result.getTestContext().getSkippedTests().removeResult(result.getMethod()); count++; return true; } return false;
} Though testNG shows all tests passed overall testsuite result showing suite as failure. It shows first iteration failure as failure exception. I have attached an image showing that. Any pointers to resolve the issue appreciated. Thanks Shankar KC
On Sunday, September 23, 2012 8:40:47 PM UTC+5:30, shankar KC wrote: I am using Latest version of testNG. testNG 6.8 I am running test using eclipse testNG plugin.Thanks Shankar KC On Sunday, September 23, 2012 6:50:29 PM UTC+5:30, Krishnan wrote: Shankar,What version of TestNG were you using? How are you running your tests?
Perhaps you might wanna include this info as well! On Sunday, September 23, 2012, shankar KC wrote:
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. I did post the same question in testNG-DEV. I havnt received any reply yet. May be they are bit busy as lot of people will request answers to their questions. I think this is a common problem and many might have faced it and found some solution already. So i am posting my question here aswell.
Thanks Shankar KC
--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To view this discussion on the web visit <a href="https://groups.google.com/d/msg/testng-users/-/bdSdkxFVXTYJ" rel="nofollow" target="_blank" onmousedown="this.href='https://groups.google.com/d/msg/testng-users/-/bdSdkxFVXTYJ';return true;" onclick="this.href='https://groups.google.com/d/msg/testng-users/-/bdSdkxFVXTYJ';return true;">https://groups.google.com/d/msg/testng-users/-/bdSdkxFVXTYJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to testng-users+unsubscribe@googlegroups.com.
For more options, visit this group at <a href="http://groups.google.com/group/testng-users?hl=en" rel="nofollow" target="_blank" onmousedown="this.href='http://groups.google.com/group/testng-users?hl\75en';return true;" onclick="this.href='http://groups.google.com/group/testng-users?hl\75en';return true;">http://groups.google.com/group/testng-users?hl=en.
-- 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/" rel="nofollow" target="_blank" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwakened-cognition.blogspot.com%2F\46sa\75D\46sntz\0751\46usg\75AFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwakened-cognition.blogspot.com%2F\46sa\75D\46sntz\0751\46usg\75AFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ';return true;">http://wakened-cognition.blogspot.com/
--
You received this message because you are subscribed to a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit <a href="https://groups.google.com/d/topic/testng-users/WMNZ5uzM6DE/unsubscribe" rel="nofollow" target="_blank" onmousedown="this.href='https://groups.google.com/d/topic/testng-users/WMNZ5uzM6DE/unsubscribe';return true;" onclick="this.href='https://groups.google.com/d/topic/testng-users/WMNZ5uzM6DE/unsubscribe';return true;">https://groups.google.com/d/topic/testng-users/WMNZ5uzM6DE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to testng-users...@googlegroups.com.
To post to this group, send email to [hidden email].
Visit this group at <a href="http://groups.google.com/group/testng-users" rel="nofollow" target="_blank" onmousedown="this.href='http://groups.google.com/group/testng-users';return true;" onclick="this.href='http://groups.google.com/group/testng-users';return true;">http://groups.google.com/group/testng-users.
For more options, visit <a href="https://groups.google.com/d/optout" rel="nofollow" target="_blank" onmousedown="this.href='https://groups.google.com/d/optout';return true;" onclick="this.href='https://groups.google.com/d/optout';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 http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.
|
|
Np glad it worked for you
On May 29, 2015 10:39 AM, "soravikr" < [hidden email]> wrote: Hi Shankar,
Thanks for you reply.your solution worked...Thank you so much :) On Friday, May 29, 2015 at 9:41:55 AM UTC+5:30, soravikr wrote: Even though a testcase passes in retry its dependent testcases are skipped.As you mentioned I made the result of the testcase skip and removed from the results even then the dependent testcase skips. On Friday, May 29, 2015 at 9:03:17 AM UTC+5:30, shankar KC wrote: Let me know the issue you are facing. I will help. I will try to send accross code i wrote. It works for me.... Once i reach office i will update.
On May 28, 2015 9:14 PM, "soravikr" < [hidden email]> wrote: I tried your solution to run the dependent testcases but it didnt work for me can you please help me. On Monday, September 24, 2012 at 9:00:29 AM UTC+5:30, shankar KC wrote: Now I am able to run the skipped test with this approach. Now the tests that are dependent are running but i still see that test suite reports that tests failed. @Override public boolean retry(ITestResult result) { if (count < maxCount) { result.setStatus(ITestResult.SKIP); // we set the status to skipped and remove this result so that on rerun if we have dependency it uses latest result. result.getTestContext().getSkippedTests().removeResult(result.getMethod()); count++; return true; } return false;
} Though testNG shows all tests passed overall testsuite result showing suite as failure. It shows first iteration failure as failure exception. I have attached an image showing that. Any pointers to resolve the issue appreciated. Thanks Shankar KC
On Sunday, September 23, 2012 8:40:47 PM UTC+5:30, shankar KC wrote: I am using Latest version of testNG. testNG 6.8 I am running test using eclipse testNG plugin.Thanks Shankar KC On Sunday, September 23, 2012 6:50:29 PM UTC+5:30, Krishnan wrote: Shankar,What version of TestNG were you using? How are you running your tests?
Perhaps you might wanna include this info as well! On Sunday, September 23, 2012, shankar KC wrote:
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. I did post the same question in testNG-DEV. I havnt received any reply yet. May be they are bit busy as lot of people will request answers to their questions. I think this is a common problem and many might have faced it and found some solution already. So i am posting my question here aswell.
Thanks Shankar KC
--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/testng-users/-/bdSdkxFVXTYJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en.
-- 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/
--
You received this message because you are subscribed to a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/testng-users/WMNZ5uzM6DE/unsubscribe.
To unsubscribe from this group and all its topics, 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 a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/testng-users/WMNZ5uzM6DE/unsubscribe.
To unsubscribe from this group and all its topics, 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.
|
|
Hi Shankar, I am facing the same issue, can you share the code that worked for Soravikr.
Thank you, Karthika
On Friday, May 29, 2015 at 2:16:15 AM UTC-7, shankar KC wrote: Np glad it worked for you
On May 29, 2015 10:39 AM, "soravikr" <<a onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;" href="javascript:" target="_blank" rel="nofollow" gdf-obfuscated-mailto="6chp-bz-dtIJ">r.sow...@...> wrote: Hi Shankar,
Thanks for you reply.your solution worked...Thank you so much :) On Friday, May 29, 2015 at 9:41:55 AM UTC+5:30, soravikr wrote: Even though a testcase passes in retry its dependent testcases are skipped.As you mentioned I made the result of the testcase skip and removed from the results even then the dependent testcase skips. On Friday, May 29, 2015 at 9:03:17 AM UTC+5:30, shankar KC wrote: Let me know the issue you are facing. I will help. I will try to send accross code i wrote. It works for me.... Once i reach office i will update.
On May 28, 2015 9:14 PM, "soravikr" < [hidden email]> wrote: I tried your solution to run the dependent testcases but it didnt work for me can you please help me. On Monday, September 24, 2012 at 9:00:29 AM UTC+5:30, shankar KC wrote: Now I am able to run the skipped test with this approach. Now the tests that are dependent are running but i still see that test suite reports that tests failed. @Override public boolean retry(ITestResult result) { if (count < maxCount) { result.setStatus(ITestResult.SKIP); // we set the status to skipped and remove this result so that on rerun if we have dependency it uses latest result. result.getTestContext().getSkippedTests().removeResult(result.getMethod()); count++; return true; } return false;
} Though testNG shows all tests passed overall testsuite result showing suite as failure. It shows first iteration failure as failure exception. I have attached an image showing that. Any pointers to resolve the issue appreciated. Thanks Shankar KC
On Sunday, September 23, 2012 8:40:47 PM UTC+5:30, shankar KC wrote: I am using Latest version of testNG. testNG 6.8 I am running test using eclipse testNG plugin.Thanks Shankar KC On Sunday, September 23, 2012 6:50:29 PM UTC+5:30, Krishnan wrote: Shankar,What version of TestNG were you using? How are you running your tests?
Perhaps you might wanna include this info as well! On Sunday, September 23, 2012, shankar KC wrote:
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. I did post the same question in testNG-DEV. I havnt received any reply yet. May be they are bit busy as lot of people will request answers to their questions. I think this is a common problem and many might have faced it and found some solution already. So i am posting my question here aswell.
Thanks Shankar KC
--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To view this discussion on the web visit <a onmousedown="this.href='https://groups.google.com/d/msg/testng-users/-/bdSdkxFVXTYJ';return true;" onclick="this.href='https://groups.google.com/d/msg/testng-users/-/bdSdkxFVXTYJ';return true;" href="https://groups.google.com/d/msg/testng-users/-/bdSdkxFVXTYJ" target="_blank" rel="nofollow">https://groups.google.com/d/msg/testng-users/-/bdSdkxFVXTYJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to testng-users+unsubscribe@googlegroups.com.
For more options, visit this group at <a onmousedown="this.href='http://groups.google.com/group/testng-users?hl\75en';return true;" onclick="this.href='http://groups.google.com/group/testng-users?hl\75en';return true;" href="http://groups.google.com/group/testng-users?hl=en" target="_blank" rel="nofollow">http://groups.google.com/group/testng-users?hl=en.
-- Thanks & Regards Krishnan Mahadevan
"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!" My Scribblings @ <a onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwakened-cognition.blogspot.com%2F\46sa\75D\46sntz\0751\46usg\75AFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwakened-cognition.blogspot.com%2F\46sa\75D\46sntz\0751\46usg\75AFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ';return true;" href="http://wakened-cognition.blogspot.com/" target="_blank" rel="nofollow">http://wakened-cognition.blogspot.com/
--
You received this message because you are subscribed to a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit <a onmousedown="this.href='https://groups.google.com/d/topic/testng-users/WMNZ5uzM6DE/unsubscribe';return true;" onclick="this.href='https://groups.google.com/d/topic/testng-users/WMNZ5uzM6DE/unsubscribe';return true;" href="https://groups.google.com/d/topic/testng-users/WMNZ5uzM6DE/unsubscribe" target="_blank" rel="nofollow">https://groups.google.com/d/topic/testng-users/WMNZ5uzM6DE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to testng-users...@googlegroups.com.
To post to this group, send email to [hidden email].
Visit this group at <a onmousedown="this.href='http://groups.google.com/group/testng-users';return true;" onclick="this.href='http://groups.google.com/group/testng-users';return true;" href="http://groups.google.com/group/testng-users" target="_blank" rel="nofollow">http://groups.google.com/group/testng-users.
For more options, visit <a onmousedown="this.href='https://groups.google.com/d/optout';return true;" onclick="this.href='https://groups.google.com/d/optout';return true;" href="https://groups.google.com/d/optout" target="_blank" rel="nofollow">https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit <a onmousedown="this.href='https://groups.google.com/d/topic/testng-users/WMNZ5uzM6DE/unsubscribe';return true;" onclick="this.href='https://groups.google.com/d/topic/testng-users/WMNZ5uzM6DE/unsubscribe';return true;" href="https://groups.google.com/d/topic/testng-users/WMNZ5uzM6DE/unsubscribe" target="_blank" rel="nofollow">https://groups.google.com/d/topic/testng-users/WMNZ5uzM6DE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to <a onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;" href="javascript:" target="_blank" rel="nofollow" gdf-obfuscated-mailto="6chp-bz-dtIJ">testng-users...@googlegroups.com.
To post to this group, send email to <a onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;" href="javascript:" target="_blank" rel="nofollow" gdf-obfuscated-mailto="6chp-bz-dtIJ">testng...@....
Visit this group at <a onmousedown="this.href='http://groups.google.com/group/testng-users';return true;" onclick="this.href='http://groups.google.com/group/testng-users';return true;" href="http://groups.google.com/group/testng-users" target="_blank" rel="nofollow">http://groups.google.com/group/testng-users.
For more options, visit <a onmousedown="this.href='https://groups.google.com/d/optout';return true;" onclick="this.href='https://groups.google.com/d/optout';return true;" href="https://groups.google.com/d/optout" target="_blank" rel="nofollow">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.
|
|
Hi Karthika,
In my case,There are testcases that depend on another testcase. If the first testcase fails and passed in retry its dependent testcases are skipped.
If your issue is same as this,you can use the below solution It worked for me.
result.getTestContext().getFailedTests().removeResult(result.getMethod());
Include the above line in retry method
On Thursday, June 25, 2015 at 3:01:24 AM UTC+5:30, Karthika wrote: Hi Shankar, I am facing the same issue, can you share the code that worked for Soravikr.
Thank you, Karthika
On Friday, May 29, 2015 at 2:16:15 AM UTC-7, shankar KC wrote: Np glad it worked for you
On May 29, 2015 10:39 AM, "soravikr" < [hidden email]> wrote: Hi Shankar,
Thanks for you reply.your solution worked...Thank you so much :) On Friday, May 29, 2015 at 9:41:55 AM UTC+5:30, soravikr wrote: Even though a testcase passes in retry its dependent testcases are skipped.As you mentioned I made the result of the testcase skip and removed from the results even then the dependent testcase skips. On Friday, May 29, 2015 at 9:03:17 AM UTC+5:30, shankar KC wrote: Let me know the issue you are facing. I will help. I will try to send accross code i wrote. It works for me.... Once i reach office i will update.
On May 28, 2015 9:14 PM, "soravikr" < [hidden email]> wrote: I tried your solution to run the dependent testcases but it didnt work for me can you please help me. On Monday, September 24, 2012 at 9:00:29 AM UTC+5:30, shankar KC wrote: Now I am able to run the skipped test with this approach. Now the tests that are dependent are running but i still see that test suite reports that tests failed. @Override public boolean retry(ITestResult result) { if (count < maxCount) { result.setStatus(ITestResult.SKIP); // we set the status to skipped and remove this result so that on rerun if we have dependency it uses latest result. result.getTestContext().getSkippedTests().removeResult(result.getMethod()); count++; return true; } return false;
} Though testNG shows all tests passed overall testsuite result showing suite as failure. It shows first iteration failure as failure exception. I have attached an image showing that. Any pointers to resolve the issue appreciated. Thanks Shankar KC
On Sunday, September 23, 2012 8:40:47 PM UTC+5:30, shankar KC wrote: I am using Latest version of testNG. testNG 6.8 I am running test using eclipse testNG plugin.Thanks Shankar KC On Sunday, September 23, 2012 6:50:29 PM UTC+5:30, Krishnan wrote: Shankar,What version of TestNG were you using? How are you running your tests?
Perhaps you might wanna include this info as well! On Sunday, September 23, 2012, shankar KC wrote:
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. I did post the same question in testNG-DEV. I havnt received any reply yet. May be they are bit busy as lot of people will request answers to their questions. I think this is a common problem and many might have faced it and found some solution already. So i am posting my question here aswell.
Thanks Shankar KC
--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To view this discussion on the web visit <a href="https://groups.google.com/d/msg/testng-users/-/bdSdkxFVXTYJ" rel="nofollow" target="_blank" onmousedown="this.href='https://groups.google.com/d/msg/testng-users/-/bdSdkxFVXTYJ';return true;" onclick="this.href='https://groups.google.com/d/msg/testng-users/-/bdSdkxFVXTYJ';return true;">https://groups.google.com/d/msg/testng-users/-/bdSdkxFVXTYJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to testng-users+unsubscribe@googlegroups.com.
For more options, visit this group at <a href="http://groups.google.com/group/testng-users?hl=en" rel="nofollow" target="_blank" onmousedown="this.href='http://groups.google.com/group/testng-users?hl\75en';return true;" onclick="this.href='http://groups.google.com/group/testng-users?hl\75en';return true;">http://groups.google.com/group/testng-users?hl=en.
-- 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/" rel="nofollow" target="_blank" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwakened-cognition.blogspot.com%2F\46sa\75D\46sntz\0751\46usg\75AFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwakened-cognition.blogspot.com%2F\46sa\75D\46sntz\0751\46usg\75AFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ';return true;">http://wakened-cognition.blogspot.com/
--
You received this message because you are subscribed to a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit <a href="https://groups.google.com/d/topic/testng-users/WMNZ5uzM6DE/unsubscribe" rel="nofollow" target="_blank" onmousedown="this.href='https://groups.google.com/d/topic/testng-users/WMNZ5uzM6DE/unsubscribe';return true;" onclick="this.href='https://groups.google.com/d/topic/testng-users/WMNZ5uzM6DE/unsubscribe';return true;">https://groups.google.com/d/topic/testng-users/WMNZ5uzM6DE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to testng-users...@googlegroups.com.
To post to this group, send email to [hidden email].
Visit this group at <a href="http://groups.google.com/group/testng-users" rel="nofollow" target="_blank" onmousedown="this.href='http://groups.google.com/group/testng-users';return true;" onclick="this.href='http://groups.google.com/group/testng-users';return true;">http://groups.google.com/group/testng-users.
For more options, visit <a href="https://groups.google.com/d/optout" rel="nofollow" target="_blank" onmousedown="this.href='https://groups.google.com/d/optout';return true;" onclick="this.href='https://groups.google.com/d/optout';return true;">https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit <a href="https://groups.google.com/d/topic/testng-users/WMNZ5uzM6DE/unsubscribe" rel="nofollow" target="_blank" onmousedown="this.href='https://groups.google.com/d/topic/testng-users/WMNZ5uzM6DE/unsubscribe';return true;" onclick="this.href='https://groups.google.com/d/topic/testng-users/WMNZ5uzM6DE/unsubscribe';return true;">https://groups.google.com/d/topic/testng-users/WMNZ5uzM6DE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to testng-users...@googlegroups.com.
To post to this group, send email to [hidden email].
Visit this group at <a href="http://groups.google.com/group/testng-users" rel="nofollow" target="_blank" onmousedown="this.href='http://groups.google.com/group/testng-users';return true;" onclick="this.href='http://groups.google.com/group/testng-users';return true;">http://groups.google.com/group/testng-users.
For more options, visit <a href="https://groups.google.com/d/optout" rel="nofollow" target="_blank" onmousedown="this.href='https://groups.google.com/d/optout';return true;" onclick="this.href='https://groups.google.com/d/optout';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 http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.
|
|
@ soravikr,
My dependency tests are still getting skipped.
This is my RetryAnalyzer class:
@Override
public boolean retry(final ITestResult result) {
if (isRetryAvailable()) {
if (counter <= retryLimit) {
result.setStatus(ITestResult.SKIP);
result.getTestContext().getFailedTests().removeResult(result);
result.getTestContext().getSkippedTests().removeResult(result);
counter++;
String message = Thread.currentThread().getName() + ": Error in " + result.getName()
+ " [result.getMethod(): " + result.getMethod() + " ] Retrying " + (retryLimit + 1 - counter)
+ " more times";
System.out.println(message);
return true;
}
System.out.println("Exhausted retries for test case " + result.getMethod());
}
return false;
}
I am facing these 2 issues: - Dependency Tests are not running even when the dependent test passes after initial failure.
- In the Report, the run is marked as Fail
Any help would be really appreciated.
Best, JigsOn Thursday, June 25, 2015 at 1:39:27 AM UTC-4, soravikr wrote: Hi Karthika,
In my case,There are testcases that depend on another testcase. If the first testcase fails and passed in retry its dependent testcases are skipped.
If your issue is same as this,you can use the below solution It worked for me.
result.getTestContext().getFailedTests().removeResult(result.getMethod());
Include the above line in retry method
On Thursday, June 25, 2015 at 3:01:24 AM UTC+5:30, Karthika wrote: Hi Shankar, I am facing the same issue, can you share the code that worked for Soravikr.
Thank you, Karthika
On Friday, May 29, 2015 at 2:16:15 AM UTC-7, shankar KC wrote: Np glad it worked for you
On May 29, 2015 10:39 AM, "soravikr" < [hidden email]> wrote: Hi Shankar,
Thanks for you reply.your solution worked...Thank you so much :) On Friday, May 29, 2015 at 9:41:55 AM UTC+5:30, soravikr wrote: Even though a testcase passes in retry its dependent testcases are skipped.As you mentioned I made the result of the testcase skip and removed from the results even then the dependent testcase skips. On Friday, May 29, 2015 at 9:03:17 AM UTC+5:30, shankar KC wrote: Let me know the issue you are facing. I will help. I will try to send accross code i wrote. It works for me.... Once i reach office i will update.
On May 28, 2015 9:14 PM, "soravikr" < [hidden email]> wrote: I tried your solution to run the dependent testcases but it didnt work for me can you please help me. On Monday, September 24, 2012 at 9:00:29 AM UTC+5:30, shankar KC wrote: Now I am able to run the skipped test with this approach. Now the tests that are dependent are running but i still see that test suite reports that tests failed. @Override public boolean retry(ITestResult result) { if (count < maxCount) { result.setStatus(ITestResult.SKIP); // we set the status to skipped and remove this result so that on rerun if we have dependency it uses latest result. result.getTestContext().getSkippedTests().removeResult(result.getMethod()); count++; return true; } return false;
} Though testNG shows all tests passed overall testsuite result showing suite as failure. It shows first iteration failure as failure exception. I have attached an image showing that. Any pointers to resolve the issue appreciated. Thanks Shankar KC
On Sunday, September 23, 2012 8:40:47 PM UTC+5:30, shankar KC wrote: I am using Latest version of testNG. testNG 6.8 I am running test using eclipse testNG plugin.Thanks Shankar KC On Sunday, September 23, 2012 6:50:29 PM UTC+5:30, Krishnan wrote: Shankar,What version of TestNG were you using? How are you running your tests?
Perhaps you might wanna include this info as well! On Sunday, September 23, 2012, shankar KC wrote:
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. I did post the same question in testNG-DEV. I havnt received any reply yet. May be they are bit busy as lot of people will request answers to their questions. I think this is a common problem and many might have faced it and found some solution already. So i am posting my question here aswell.
Thanks Shankar KC
--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To view this discussion on the web visit <a href="https://groups.google.com/d/msg/testng-users/-/bdSdkxFVXTYJ" rel="nofollow" target="_blank" onmousedown="this.href='https://groups.google.com/d/msg/testng-users/-/bdSdkxFVXTYJ';return true;" onclick="this.href='https://groups.google.com/d/msg/testng-users/-/bdSdkxFVXTYJ';return true;">https://groups.google.com/d/msg/testng-users/-/bdSdkxFVXTYJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to testng-users+unsubscribe@googlegroups.com.
For more options, visit this group at <a href="http://groups.google.com/group/testng-users?hl=en" rel="nofollow" target="_blank" onmousedown="this.href='http://groups.google.com/group/testng-users?hl\x3den';return true;" onclick="this.href='http://groups.google.com/group/testng-users?hl\x3den';return true;">http://groups.google.com/group/testng-users?hl=en.
-- 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/" rel="nofollow" target="_blank" onmousedown="this.href='http://www.google.com/url?q\x3dhttp%3A%2F%2Fwakened-cognition.blogspot.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ';return true;" onclick="this.href='http://www.google.com/url?q\x3dhttp%3A%2F%2Fwakened-cognition.blogspot.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ';return true;">http://wakened-cognition.blogspot.com/
--
You received this message because you are subscribed to a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit <a href="https://groups.google.com/d/topic/testng-users/WMNZ5uzM6DE/unsubscribe" rel="nofollow" target="_blank" onmousedown="this.href='https://groups.google.com/d/topic/testng-users/WMNZ5uzM6DE/unsubscribe';return true;" onclick="this.href='https://groups.google.com/d/topic/testng-users/WMNZ5uzM6DE/unsubscribe';return true;">https://groups.google.com/d/topic/testng-users/WMNZ5uzM6DE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to testng-users...@googlegroups.com.
To post to this group, send email to [hidden email].
Visit this group at <a href="http://groups.google.com/group/testng-users" rel="nofollow" target="_blank" onmousedown="this.href='http://groups.google.com/group/testng-users';return true;" onclick="this.href='http://groups.google.com/group/testng-users';return true;">http://groups.google.com/group/testng-users.
For more options, visit <a href="https://groups.google.com/d/optout" rel="nofollow" target="_blank" onmousedown="this.href='https://groups.google.com/d/optout';return true;" onclick="this.href='https://groups.google.com/d/optout';return true;">https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "testng-users" group.
To unsubscribe from this topic, visit <a href="https://groups.google.com/d/topic/testng-users/WMNZ5uzM6DE/unsubscribe" rel="nofollow" target="_blank" onmousedown="this.href='https://groups.google.com/d/topic/testng-users/WMNZ5uzM6DE/unsubscribe';return true;" onclick="this.href='https://groups.google.com/d/topic/testng-users/WMNZ5uzM6DE/unsubscribe';return true;">https://groups.google.com/d/topic/testng-users/WMNZ5uzM6DE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to testng-users...@googlegroups.com.
To post to this group, send email to [hidden email].
Visit this group at <a href="http://groups.google.com/group/testng-users" rel="nofollow" target="_blank" onmousedown="this.href='http://groups.google.com/group/testng-users';return true;" onclick="this.href='http://groups.google.com/group/testng-users';return true;">http://groups.google.com/group/testng-users.
For more options, visit <a href="https://groups.google.com/d/optout" rel="nofollow" target="_blank" onmousedown="this.href='https://groups.google.com/d/optout';return true;" onclick="this.href='https://groups.google.com/d/optout';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.
|
|
Hi, Following is the retry method I have used and it is not working. Can anyone please help me with this. @Override public boolean retry(final ITestResult result) { if (!result.isSuccess()) { if (counter < retryLimit) { result.getTestContext().getFailedTests().removeResult(result); result.getTestContext().getSkippedTests().removeResult(result); counter++; return true; } else { result.setStatus(ITestResult.FAILURE);
} } else { result.setStatus(ITestResult.SUCCESS); } return false; } On Sunday, September 23, 2012 at 6:50:20 PM UTC+5:30, Krishnan Mahadevan wrote: Shankar,What version of TestNG were you using? How are you running your tests?
Perhaps you might wanna include this info as well! On Sunday, September 23, 2012, shankar KC wrote:
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. I did post the same question in testNG-DEV. I havnt received any reply yet. May be they are bit busy as lot of people will request answers to their questions. I think this is a common problem and many might have faced it and found some solution already. So i am posting my question here aswell.
Thanks Shankar KC
--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To view this discussion on the web visit <a href="https://groups.google.com/d/msg/testng-users/-/bdSdkxFVXTYJ" target="_blank" rel="nofollow" onmousedown="this.href='https://groups.google.com/d/msg/testng-users/-/bdSdkxFVXTYJ';return true;" onclick="this.href='https://groups.google.com/d/msg/testng-users/-/bdSdkxFVXTYJ';return true;">https://groups.google.com/d/msg/testng-users/-/bdSdkxFVXTYJ.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to testng-users+unsubscribe@googlegroups.com.
For more options, visit this group at <a href="http://groups.google.com/group/testng-users?hl=en" target="_blank" rel="nofollow" onmousedown="this.href='http://groups.google.com/group/testng-users?hl\x3den';return true;" onclick="this.href='http://groups.google.com/group/testng-users?hl\x3den';return true;">http://groups.google.com/group/testng-users?hl=en.
-- 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='http://www.google.com/url?q\x3dhttp%3A%2F%2Fwakened-cognition.blogspot.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ';return true;" onclick="this.href='http://www.google.com/url?q\x3dhttp%3A%2F%2Fwakened-cognition.blogspot.com%2F\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHzOdYJCASIDF_28vQtkp9gnKAYSQ';return true;">http://wakened-cognition.blogspot.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 [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.
|
|