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
public class DataProviderAnnotation extends BaseAnnotation implements IDataProviderAnnotation
An implementation of IDataProvider.
-
-
Constructor Summary
Constructors Constructor Description DataProviderAnnotation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcacheDataForTestRetries(boolean cache)java.util.List<java.lang.Integer>getIndices()java.lang.StringgetName()booleanisCacheDataForTestRetries()booleanisParallel()Whether this data provider should be used in parallel.booleanisPropagateFailureAsTestFailure()voidpropagateFailureAsTestFailure()Have TestNG consider failures in data provider methods as test failures.java.lang.Class<? extends IRetryDataProvider>retryUsing()voidsetIndices(java.util.List<java.lang.Integer> indices)voidsetName(java.lang.String name)voidsetParallel(boolean parallel)voidsetRetryUsing(java.lang.Class<? extends IRetryDataProvider> retry)-
Methods inherited from class org.testng.internal.annotations.BaseAnnotation
getConstructor, getMethod, getTestClass, setConstructor, setMethod, setTestClass
-
-
-
-
Method Detail
-
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
public java.lang.String getName()
- Specified by:
getNamein interfaceIDataProviderAnnotation- Returns:
- The name of this DataProvider.
-
setName
public void setName(java.lang.String name)
- Specified by:
setNamein interfaceIDataProviderAnnotation
-
getIndices
public java.util.List<java.lang.Integer> getIndices()
- Specified by:
getIndicesin interfaceIDataProviderAnnotation
-
setIndices
public void setIndices(java.util.List<java.lang.Integer> indices)
- 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
public void setRetryUsing(java.lang.Class<? extends IRetryDataProvider> retry)
- Specified by:
setRetryUsingin interfaceIDataProviderAnnotation- Parameters:
retry- - A Class that implementsIRetryDataProviderand which can be used to retry a data provider.
-
retryUsing
public java.lang.Class<? extends IRetryDataProvider> 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.
-
-