Top Description Fields Constructors Methods
org.testng.util

public abstract Class RetryAnalyzerCount

extends Object
implements IRetryAnalyzer
Class Inheritance
All Implemented Interfaces
org.testng.IRetryAnalyzer
Imports
java.util.concurrent.atomic.AtomicInteger, org.testng.IRetryAnalyzer, .ITestResult

An implementation of IRetryAnalyzer that allows you to specify the maximum number of times you want your test to be retried.
Author
[email protected] (Jeremie Lenfant-Engelmann)

Field Summary

Modifier and TypeField and Description
pack-priv AtomicInteger

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected int

Returns:

the current counter value
getCount
()

public boolean
retry(ITestResult
The result of the test.
result
)

Implements org.testng.IRetryAnalyzer.retry.

Retries the test if count is not 0.
public abstract boolean

Returns:

true if the test must be retried, false otherwise.
retryMethod
(ITestResult
The result of the test.
result
)

The method implemented by the class that test if the test must be retried or not.

protected void
setCount(int
the max number of time the method needs to be retried.
count
)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

countback to summary
pack-priv AtomicInteger count

Constructor Detail

RetryAnalyzerCountback to summary
public RetryAnalyzerCount()

Method Detail

getCountback to summary
protected int getCount()
Returns:int

the current counter value

retryback to summary
public boolean retry(ITestResult result)

Implements org.testng.IRetryAnalyzer.retry.

Retries the test if count is not 0.

Parameters
result:ITestResult

The result of the test.

Returns:boolean

Doc from org.testng.IRetryAnalyzer.retry.

true if the test method has to be retried, false otherwise.

Annotations
@Override
retryMethodback to summary
public abstract boolean retryMethod(ITestResult result)

The method implemented by the class that test if the test must be retried or not.

Parameters
result:ITestResult

The result of the test.

Returns:boolean

true if the test must be retried, false otherwise.

setCountback to summary
protected void setCount(int count)
Parameters
count:int

the max number of time the method needs to be retried.