Package org.testng.annotations
Annotation Interface Factory
Marks a method as a factory that returns objects that will be used by TestNG as Test classes. The
method must return Object[].
-
Optional Element Summary
Modifier and TypeOptional ElementDescriptionThe name of the data provider for this test method.Class<?>
The class where to look for the data provider.boolean
Whether this factory is enabled.int[]
-
Element Details
-
dataProvider
String dataProviderThe name of the data provider for this test method.- Returns:
- the data provider name (default none)
- See Also:
- Default:
- ""
-
dataProviderClass
Class<?> dataProviderClassThe class where to look for the data provider. If not specified, the data provider will be looked on the class of the current test method or one of its super classes. If this attribute is specified, the data provider method needs to be static on the specified class.- Returns:
- the data provider class (default none)
- Default:
- java.lang.Object.class
-
enabled
boolean enabledWhether this factory is enabled.- Returns:
- the value (default true)
- Default:
- true
-
indices
int[] indices- Default:
- {}
-