All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.testng.annotations.DataProvider Maven / Gradle / Ivy

There is a newer version: 7.10.1
Show newest version
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.
 */
@Retention(java.lang.annotation.RetentionPolicy.RUNTIME)
@Target({METHOD})
@Documented
public @interface DataProvider {

  /** The name of this DataProvider. */
  String name() default "";

  /** Whether this data provider should be run in parallel. */
  boolean parallel() default false;

  /** Which indices to run from this data provider, default: all. */
  int[] indices() default {};
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy