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 TypeMethodDescriptionvoidcacheDataForTestRetries(boolean cache) getName()booleanbooleanWhether this data provider should be used in parallel.booleanvoidHave TestNG consider failures in data provider methods as test failures.Class<? extends IRetryDataProvider> voidsetIndices(List<Integer> indices) voidvoidsetParallel(boolean parallel) voidsetRetryUsing(Class<? extends IRetryDataProvider> retry) Methods inherited from class BaseAnnotation
getConstructor, getMethod, getTestClass, setConstructor, setMethod, setTestClass
-
Constructor Details
-
DataProviderAnnotation
public DataProviderAnnotation()
-
-
Method Details
-
isParallel
public boolean isParallel()Description copied from interface:IDataProviderAnnotationWhether this data provider should be used in parallel.- Specified by:
isParallelin interfaceIDataProviderAnnotation- Returns:
- true if in parallel
-
setParallel
public void setParallel(boolean parallel) - Specified by:
setParallelin interfaceIDataProviderAnnotation
-
getName
- Specified by:
getNamein interfaceIDataProviderAnnotation- Returns:
- The name of this DataProvider.
-
setName
- Specified by:
setNamein interfaceIDataProviderAnnotation
-
getIndices
- Specified by:
getIndicesin interfaceIDataProviderAnnotation
-
setIndices
- Specified by:
setIndicesin interfaceIDataProviderAnnotation
-
propagateFailureAsTestFailure
public void propagateFailureAsTestFailure()Description copied from interface:IDataProviderAnnotationHave TestNG consider failures in data provider methods as test failures.- Specified by:
propagateFailureAsTestFailurein interfaceIDataProviderAnnotation
-
isPropagateFailureAsTestFailure
public boolean isPropagateFailureAsTestFailure()- Specified by:
isPropagateFailureAsTestFailurein interfaceIDataProviderAnnotation- Returns:
- -
trueIf data provider failures should be propagated as test failures
-
setRetryUsing
- Specified by:
setRetryUsingin interfaceIDataProviderAnnotation- Parameters:
retry- - A Class that implementsIRetryDataProviderand which can be used to retry a data provider.
-
retryUsing
- Specified by:
retryUsingin interfaceIDataProviderAnnotation- Returns:
- - An Class which implements
IRetryDataProviderand which can be used to retry a data provider.
-
cacheDataForTestRetries
public void cacheDataForTestRetries(boolean cache) - Specified by:
cacheDataForTestRetriesin 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:
isCacheDataForTestRetriesin interfaceIDataProviderAnnotation- Returns:
- -
trueif TestNG should use data returned by the original data provider invocation, when a test method fails and is configured to be retried.
-