Annotation Type Parameters


  • @Retention(RUNTIME)
    @Target({METHOD,CONSTRUCTOR,TYPE})
    public @interface Parameters
    Describes how to pass parameters to a @Test method.
    • Field Summary

      Fields 
      Modifier and Type Fields Description
      static java.lang.String NULL_VALUE  
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      java.lang.String[] value
      The list of variables used to fill the parameters of this method.
    • Field Detail

      • NULL_VALUE

        static final java.lang.String NULL_VALUE
    • Element Detail

      • value

        java.lang.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:
        the value
        Default:
        {}