Top Description Fields Methods
org.testng.annotations

public @Interface Parameters

extends Annotation
Annotations
@Retention:RUNTIME
@Target:METHOD, CONSTRUCTOR, TYPE
Static Imports
java.lang.annotation.ElementType.CONSTRUCTOR, .ElementType.METHOD, .ElementType.TYPE, .RetentionPolicy.RUNTIME

Describes how to pass parameters to a @Test method.

Field Summary

Modifier and TypeField and Description
public static final String

Method Summary

Modifier and TypeMethod and Description
public String[]

Returns:

the value
value
()

The list of variables used to fill the parameters of this method.

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Field Detail

NULL_VALUEback to summary
public static final String NULL_VALUE

Method Detail

valueback to summary
public String[] value()

The list of variables used to fill the parameters of this method. These variables must be defined in your testng.xml file. For example

@Parameters({ "xmlPath" })
@Test
public void verifyXmlFile(String path) { ... }

and in testng.xml:

<parameter name="xmlPath" value="account.xml" />

Returns:String[]

the value