Package org.testng.annotations
Annotation Type DataProvider
-
@Retention(RUNTIME) @Target(METHOD) @Documented public @interface DataProviderMark a method as supplying data for a test method.The
namedefaults to the name of the annotated method.The annotated method must return any of the following:
Object[][]orIterator<Object[]>, where eachObject[]is assigned to the parameter list of the test method.Object[]orIterator<Object>, where eachObjectis assigned to the single parameter of the test method.
The
@Testmethod that wants to receive data from thisDataProviderneeds to use aTest.dataProvider()name equal to the name of this annotation.
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description booleancacheDataForTestRetriesint[]indicesWhich indices to run from this data provider, default: all.java.lang.StringnameThe name of this DataProvider.booleanparallelWhether this data provider should be run in parallel.booleanpropagateFailureAsTestFailureHelps TestNG decide if it should treat data provider failures as test failures.java.lang.Class<? extends IRetryDataProvider>retryUsing
-
-
-
-
retryUsing
java.lang.Class<? extends IRetryDataProvider> retryUsing
- Returns:
- - An Class which implements
IRetryDataProviderand which can be used to retry a data provider.
- Default:
- org.testng.IRetryDataProvider.DisableDataProviderRetries.class
-
-