[request] Test retry

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

[request] Test retry

Tomás Pollak-2
Hi Cedric,

I recently have been faced with a situation where I could have used a global "retry" parameter.
I understand that the @Test annotation can have a IRetryAnalyzer parameter, but I think its use is too complicated for what the normal use case is, forcing the clients to implement that interface and declaring it for all the tests.

It would ease the configuration a lot if we could pass a retryCount="2" to the suite xml file and/or to the maven plugin configuration.

Would this be difficult to implement?
Would other users in this mailing list also like this feature? (just reply with +1)

Cheers,
Tomás

--
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.
Reply | Threaded
Open this post in threaded view
|

Re: [request] Test retry

AndreH
+1

Em quarta-feira, 9 de junho de 2010 21h42min43s UTC-3, Tomás Pollak escreveu:
Hi Cedric,

I recently have been faced with a situation where I could have used a global "retry" parameter.
I understand that the @Test annotation can have a IRetryAnalyzer parameter, but I think its use is too complicated for what the normal use case is, forcing the clients to implement that interface and declaring it for all the tests.

It would ease the configuration a lot if we could pass a retryCount="2" to the suite xml file and/or to the maven plugin configuration.

Would this be difficult to implement?
Would other users in this mailing list also like this feature? (just reply with +1)

Cheers,
Tomás

--
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/-/8lpadyuL2qwJ.
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.
Reply | Threaded
Open this post in threaded view
|

Re: [request] Test retry

Roman Hiden
In reply to this post by Tomás Pollak-2
+1
That would be a nice feature

On Wednesday, June 9, 2010 7:42:43 PM UTC-5, Tomás Pollak wrote:
Hi Cedric,

I recently have been faced with a situation where I could have used a global "retry" parameter.
I understand that the @Test annotation can have a IRetryAnalyzer parameter, but I think its use is too complicated for what the normal use case is, forcing the clients to implement that interface and declaring it for all the tests.

It would ease the configuration a lot if we could pass a retryCount="2" to the suite xml file and/or to the maven plugin configuration.

Would this be difficult to implement?
Would other users in this mailing list also like this feature? (just reply with +1)

Cheers,
Tomás

--
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/-/K3KWTYna38wJ.
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.
Reply | Threaded
Open this post in threaded view
|

Re: [request] Test retry

charris
In reply to this post by Tomás Pollak-2
I would love this.

But I would need it to work correctly with DataProviders and Factories (ie. each instance of a TC would need to get X retries) and to only should a failure if all retries failed. I would like it to show TCs that failed then passed later as skips, or a new status of retried so I can look at them later, but mostly, I want to be able to see all passes if they passed in the end.

On Wednesday, June 9, 2010 5:42:43 PM UTC-7, Tomás Pollak wrote:
Hi Cedric,

I recently have been faced with a situation where I could have used a global "retry" parameter.
I understand that the @Test annotation can have a IRetryAnalyzer parameter, but I think its use is too complicated for what the normal use case is, forcing the clients to implement that interface and declaring it for all the tests.

It would ease the configuration a lot if we could pass a retryCount="2" to the suite xml file and/or to the maven plugin configuration.

Would this be difficult to implement?
Would other users in this mailing list also like this feature? (just reply with +1)

Cheers,
Tomás

--
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/-/_n8UpN5QxawJ.
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.
Reply | Threaded
Open this post in threaded view
|

Re: [request] Test retry

shankarkc78@gmail.com
In reply to this post by Tomás Pollak-2
+1

On Thursday, June 10, 2010 6:12:43 AM UTC+5:30, Tomás Pollak wrote:
Hi Cedric,

I recently have been faced with a situation where I could have used a global "retry" parameter.
I understand that the @Test annotation can have a IRetryAnalyzer parameter, but I think its use is too complicated for what the normal use case is, forcing the clients to implement that interface and declaring it for all the tests.

It would ease the configuration a lot if we could pass a retryCount="2" to the suite xml file and/or to the maven plugin configuration.

Would this be difficult to implement?
Would other users in this mailing list also like this feature? (just reply with +1)

Cheers,
Tomás

--
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/-/fKvZUR3IFfIJ.
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.
Reply | Threaded
Open this post in threaded view
|

Re: [request] Test retry

shankarkc78@gmail.com
In reply to this post by Tomás Pollak-2
I added this functionality to our test framework. No need to add annotation to each method/class. I read a property and based on it i will add retryAnalyzer annotation to tests.
@Override
public void transform(ITestAnnotation annotation,
Class testClass,
Constructor testConstructor,
Method testMethod) {
if ((annotation.getRetryAnalyzer() == null)
&& (RetryAnalyzer.getMaxRerun() > 0)) {
logDebug(
tcID,
"Adding RetryAnalyzer.class to method "
+ testMethod.getName()
+ " as test suite properties has rerun count = "
+ RetryAnalyzer.getMaxRerun()+ " To enable rerun of failed test case");
annotation.setRetryAnalyzer(RetryAnalyzer.class);
}

}

static public int getMaxRerun() {
Integer rerunCount = 0;
String property = EnvironmentSpecificProperty.getProperty(
xxxxxxxx.base.common.Constants.NUMBER_OF_RERUNS,
tcID);
if (!StringUtils.isEmpty(property))
rerunCount = Integer.valueOf(property);
return rerunCount;
}
Hope it helps. Its working fine in our test framework.
Tests just use it as below :- in property file they just add
rerunNum=1
By default no retry. If we see this we retry that many attempts user specified.
For the kicks we have added a configurable sleeptime as well before rerunning tests incase if user want to wait before rerunning tests(OPTIONAL).
like :-
#delay in secs
rerunDelay=1

Thanks
Shankar KC
On Thursday, June 10, 2010 6:12:43 AM UTC+5:30, Tomás Pollak wrote:
Hi Cedric,

I recently have been faced with a situation where I could have used a global "retry" parameter.
I understand that the @Test annotation can have a IRetryAnalyzer parameter, but I think its use is too complicated for what the normal use case is, forcing the clients to implement that interface and declaring it for all the tests.

It would ease the configuration a lot if we could pass a retryCount="2" to the suite xml file and/or to the maven plugin configuration.

Would this be difficult to implement?
Would other users in this mailing list also like this feature? (just reply with +1)

Cheers,
Tomás

--
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/-/xljpVhDHIm8J.
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.