Package org.testng.annotations
Interface IDataProviderAnnotation
- All Superinterfaces:
IAnnotation
Encapsulate the @DataProvider / @testng.data-provider annotation
-
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)
-
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:
- -
true
If data provider failures should be propagated as test failures
-
setRetryUsing
- Parameters:
retry
- - A Class that implementsIRetryDataProvider
and which can be used to retry a data provider.
-
retryUsing
Class<? extends IRetryDataProvider> retryUsing()- Returns:
- - An Class which implements
IRetryDataProvider
and 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:
- -
true
if TestNG should use data returned by the original data provider invocation, when a test method fails and is configured to be retried.
-