Package org.testng.annotations
Annotation Type Factory
-
@Retention(RUNTIME) @Target({METHOD,CONSTRUCTOR}) @Documented public @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
Optional Elements Modifier and Type Optional Element Description java.lang.String
dataProvider
The name of the data provider for this test method.java.lang.Class<?>
dataProviderClass
The class where to look for the data provider.boolean
enabled
Whether this factory is enabled.int[]
indices
java.lang.String[]
parameters
Deprecated.Use @Parameters
-
-
-
-
dataProvider
java.lang.String dataProvider
The name of the data provider for this test method.- See Also:
DataProvider
- Default:
- ""
-
-
-
dataProviderClass
java.lang.Class<?> dataProviderClass
The class where to look for the data provider. If not specified, the dataprovider 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.- Default:
- java.lang.Object.class
-
-