Interface IDataProviderAnnotation
- All Superinterfaces:
IAnnotation
- All Known Implementing Classes:
DataProviderAnnotation
Encapsulate the @DataProvider / @testng.data-provider annotation
-
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)
-
Method Details
-
getName
String getName()- Returns:
- The name of this DataProvider.
-
setName
-
isParallel
boolean isParallel()Whether this data provider should be used in parallel.- Returns:
- true if in parallel
-
setParallel
void setParallel(boolean parallel) -
getIndices
-
setIndices
-
propagateFailureAsTestFailure
void propagateFailureAsTestFailure()Have TestNG consider failures in data provider methods as test failures. -
isPropagateFailureAsTestFailure
boolean isPropagateFailureAsTestFailure()- Returns:
- -
trueIf data provider failures should be propagated as test failures
-
setRetryUsing
- Parameters:
retry- - A Class that implementsIRetryDataProviderand which can be used to retry a data provider.
-
retryUsing
Class<? extends IRetryDataProvider> retryUsing()- Returns:
- - An Class which implements
IRetryDataProviderand which can be used to retry a data provider.
-
cacheDataForTestRetries
void cacheDataForTestRetries(boolean cache) - Parameters:
cache- - when set totrue, TestNG does not invoke the data provider again when retrying failed tests using a retry analyzer.
-
isCacheDataForTestRetries
boolean isCacheDataForTestRetries()- Returns:
- -
trueif TestNG should use data returned by the original data provider invocation, when a test method fails and is configured to be retried.
-