Package org.testng.internal.annotations
Class DataProviderAnnotation
java.lang.Object
org.testng.internal.annotations.BaseAnnotation
org.testng.internal.annotations.DataProviderAnnotation
- All Implemented Interfaces:
IAnnotation
,IDataProviderAnnotation
An implementation of IDataProvider.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
cacheDataForTestRetries
(boolean cache) getName()
boolean
boolean
Whether this data provider should be used in parallel.boolean
void
Have TestNG consider failures in data provider methods as test failures.Class
<? extends IRetryDataProvider> void
setIndices
(List<Integer> indices) void
void
setParallel
(boolean parallel) void
setRetryUsing
(Class<? extends IRetryDataProvider> retry) Methods inherited from class org.testng.internal.annotations.BaseAnnotation
getConstructor, getMethod, getTestClass, setConstructor, setMethod, setTestClass
-
Constructor Details
-
DataProviderAnnotation
public DataProviderAnnotation()
-
-
Method Details
-
isParallel
public boolean isParallel()Description copied from interface:IDataProviderAnnotation
Whether this data provider should be used in parallel.- Specified by:
isParallel
in interfaceIDataProviderAnnotation
- Returns:
- true if in parallel
-
setParallel
public void setParallel(boolean parallel) - Specified by:
setParallel
in interfaceIDataProviderAnnotation
-
getName
- Specified by:
getName
in interfaceIDataProviderAnnotation
- Returns:
- The name of this DataProvider.
-
setName
- Specified by:
setName
in interfaceIDataProviderAnnotation
-
getIndices
- Specified by:
getIndices
in interfaceIDataProviderAnnotation
-
setIndices
- Specified by:
setIndices
in interfaceIDataProviderAnnotation
-
propagateFailureAsTestFailure
public void propagateFailureAsTestFailure()Description copied from interface:IDataProviderAnnotation
Have TestNG consider failures in data provider methods as test failures.- Specified by:
propagateFailureAsTestFailure
in interfaceIDataProviderAnnotation
-
isPropagateFailureAsTestFailure
public boolean isPropagateFailureAsTestFailure()- Specified by:
isPropagateFailureAsTestFailure
in interfaceIDataProviderAnnotation
- Returns:
- -
true
If data provider failures should be propagated as test failures
-
setRetryUsing
- Specified by:
setRetryUsing
in interfaceIDataProviderAnnotation
- Parameters:
retry
- - A Class that implementsIRetryDataProvider
and which can be used to retry a data provider.
-
retryUsing
- Specified by:
retryUsing
in interfaceIDataProviderAnnotation
- Returns:
- - An Class which implements
IRetryDataProvider
and which can be used to retry a data provider.
-
cacheDataForTestRetries
public void cacheDataForTestRetries(boolean cache) - Specified by:
cacheDataForTestRetries
in interfaceIDataProviderAnnotation
- Parameters:
cache
- - when set totrue
, TestNG does not invoke the data provider again when retrying failed tests using a retry analyzer.
-
isCacheDataForTestRetries
public boolean isCacheDataForTestRetries()- Specified by:
isCacheDataForTestRetries
in interfaceIDataProviderAnnotation
- Returns:
- -
true
if TestNG should use data returned by the original data provider invocation, when a test method fails and is configured to be retried.
-