package org.testng.annotations;

import static java.lang.annotation.ElementType.METHOD;

import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

Mark a method as supplying data for a test method. The data provider name defaults to method name. The annotated method must return an Object[][] where each Object[] can be assigned the parameter list of the test method. The @Test method that wants to receive data from this DataProvider needs to use a dataProvider name equals to the name of this annotation.
/** * Mark a method as supplying data for a test method. The data provider name defaults to method * name. The annotated method must return an Object[][] where each Object[] can be assigned the * parameter list of the test method. The @Test method that wants to receive data from this * DataProvider needs to use a dataProvider name equals to the name of this annotation. */
@Retention(java.lang.annotation.RetentionPolicy.RUNTIME) @Target({METHOD}) @Documented public @interface DataProvider {
The name of this DataProvider.
Returns:the value (default empty)
/** * The name of this DataProvider. * * @return the value (default empty) */
String name() default "";
Whether this data provider should be run in parallel.
Returns:the value (default false)
/** * Whether this data provider should be run in parallel. * * @return the value (default false) */
boolean parallel() default false;
Which indices to run from this data provider, default: all.
Returns:the value
/** * Which indices to run from this data provider, default: all. * * @return the value */
int[] indices() default {}; }