org.testng.annotations.Parameters Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of testng Show documentation
Show all versions of testng Show documentation
A testing framework for the JVM
package org.testng.annotations;
import static java.lang.annotation.ElementType.CONSTRUCTOR;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
/**
* Describes how to pass parameters to a @Test method.
*/
@Retention(RUNTIME)
@Target({METHOD, CONSTRUCTOR, TYPE})
public @interface Parameters {
/**
* 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" />
*
*/
String[] value() default {};
}