Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.testng
Class TestNGCommandLineArgs

    java.lang.Object
      org.testng.TestNGCommandLineArgs

    public final class TestNGCommandLineArgs

extends java.lang.Object

TestNG/RemoteTestNG command line arguments parser.

Author:
  Cedric Beust, Alexandru Popescu

Field Summary
`static java.lang.String` | `ANNOTATIONS_COMMAND_OPT` The default annotations option (useful in TestNG 15 only).
`static java.lang.String` | `DATA_PROVIDER_THREAD_COUNT`
`static java.lang.String` | `EXCLUDED_GROUPS_COMMAND_OPT`
`static java.lang.String` | `GROUPS_COMMAND_OPT`
`static java.lang.String` | `HOST_COMMAND_OPT`
`static java.lang.String` | `JUNIT_DEF_OPT`
`static java.lang.String` | `LISTENER_COMMAND_OPT`
`static java.lang.String` | `LOG` The logging level option.
`static java.lang.String` | `MASTER_OPT`
`static java.lang.String` | `OBJECT_FACTORY_COMMAND_OPT`
`static java.lang.String` | `OUTDIR_COMMAND_OPT` The test report output directory option.
`static java.lang.String` | `PARALLEL_MODE`
`static java.lang.String` | `PORT_COMMAND_OPT`
`static java.lang.String` | `REPORTER` Used to pass a reporter configuration in the form `-reporter :option=value[,option=value]`
`static java.lang.String` | `REPORTERS_LIST` Used as map key for the complete list of report listeners provided with the above argument
`static java.lang.String` | `SHOW_TESTNG_STACK_FRAMES`
`static java.lang.String` | `SKIP_FAILED_INVOCATION_COUNT_OPT`
`static java.lang.String` | `SLAVE_OPT`
`static java.lang.String` | `SRC_COMMAND_OPT` The source directory option (when using JavaDoc type annotations).
`static java.lang.String` | `SUITE_DEF_OPT`
`static java.lang.String` | `SUITE_NAME_OPT`
`static java.lang.String` | `TARGET_COMMAND_OPT` Deprecated. replaced by DEFAULT_ANNOTATIONS_COMMAND_OPT.
`static java.lang.String` | `TEST_CLASSPATH`
`static java.lang.String` | `TEST_NAME_OPT`
`static java.lang.String` | `TESTCLASS_COMMAND_OPT` The list of test classes option.
`static java.lang.String` | `TESTJAR_COMMAND_OPT`
`static java.lang.String` | `TESTRUNNER_FACTORY_COMMAND_OPT`
`static java.lang.String` | `THREAD_COUNT`
`static java.lang.String` | `USE_DEFAULT_LISTENERS`

Method Summary
`static java.util.Map` | `parseCommandLine(java.lang.String[] originalArgv)` Parses the command line options and returns a map from option string to parsed values.
`static java.util.List<java.lang.String>` | `readFile(java.lang.String fileName)` Reads the file specified by filename and returns the file content as a string.
`static void` | `usage()` Prints the usage message to System.out.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### SHOW_TESTNG_STACK_FRAMES

    public static final java.lang.String SHOW_TESTNG_STACK_FRAMES

See Also:
  Constant Field Values

### TEST_CLASSPATH

    public static final java.lang.String TEST_CLASSPATH

See Also:
  Constant Field Values

### PORT_COMMAND_OPT

    public static final java.lang.String PORT_COMMAND_OPT

See Also:
  Constant Field Values

### HOST_COMMAND_OPT

    public static final java.lang.String HOST_COMMAND_OPT

See Also:
  Constant Field Values

### LOG

    public static final java.lang.String LOG

  The logging level option.

  See Also:
    Constant Field Values

### TARGET_COMMAND_OPT

    public static final java.lang.String TARGET_COMMAND_OPT

  Deprecated. replaced by DEFAULT_ANNOTATIONS_COMMAND_OPT.
  See Also:
    Constant Field Values

### ANNOTATIONS_COMMAND_OPT

    public static final java.lang.String ANNOTATIONS_COMMAND_OPT

  The default annotations option (useful in TestNG 15 only).

  See Also:
    Constant Field Values

### OUTDIR_COMMAND_OPT

    public static final java.lang.String OUTDIR_COMMAND_OPT

  The test report output directory option.

  See Also:
    Constant Field Values

### EXCLUDED_GROUPS_COMMAND_OPT

    public static final java.lang.String EXCLUDED_GROUPS_COMMAND_OPT

See Also:
  Constant Field Values

### GROUPS_COMMAND_OPT

    public static final java.lang.String GROUPS_COMMAND_OPT

See Also:
  Constant Field Values

### JUNIT_DEF_OPT

    public static final java.lang.String JUNIT_DEF_OPT

See Also:
  Constant Field Values

### LISTENER_COMMAND_OPT

    public static final java.lang.String LISTENER_COMMAND_OPT

See Also:
  Constant Field Values

### MASTER_OPT

    public static final java.lang.String MASTER_OPT

See Also:
  Constant Field Values

### OBJECT_FACTORY_COMMAND_OPT

    public static final java.lang.String OBJECT_FACTORY_COMMAND_OPT

See Also:
  Constant Field Values

### REPORTER

    public static final java.lang.String REPORTER

  Used to pass a reporter configuration in the form `-reporter :option=value[,option=value]`

  See Also:
    Constant Field Values

### REPORTERS_LIST

    public static final java.lang.String REPORTERS_LIST

  Used as map key for the complete list of report listeners provided with the above argument

  See Also:
    Constant Field Values

### PARALLEL_MODE

    public static final java.lang.String PARALLEL_MODE

See Also:
  Constant Field Values

### SKIP_FAILED_INVOCATION_COUNT_OPT

    public static final java.lang.String SKIP_FAILED_INVOCATION_COUNT_OPT

See Also:
  Constant Field Values

### SLAVE_OPT

    public static final java.lang.String SLAVE_OPT

See Also:
  Constant Field Values

### SRC_COMMAND_OPT

    public static final java.lang.String SRC_COMMAND_OPT

  The source directory option (when using JavaDoc type annotations).

  See Also:
    Constant Field Values

### SUITE_NAME_OPT

    public static final java.lang.String SUITE_NAME_OPT

See Also:
  Constant Field Values

### TESTCLASS_COMMAND_OPT

    public static final java.lang.String TESTCLASS_COMMAND_OPT

  The list of test classes option.

  See Also:
    Constant Field Values

### TESTJAR_COMMAND_OPT

    public static final java.lang.String TESTJAR_COMMAND_OPT

See Also:
  Constant Field Values

### TEST_NAME_OPT

    public static final java.lang.String TEST_NAME_OPT

See Also:
  Constant Field Values

### TESTRUNNER_FACTORY_COMMAND_OPT

    public static final java.lang.String TESTRUNNER_FACTORY_COMMAND_OPT

See Also:
  Constant Field Values

### THREAD_COUNT

    public static final java.lang.String THREAD_COUNT

See Also:
  Constant Field Values

### DATA_PROVIDER_THREAD_COUNT

    public static final java.lang.String DATA_PROVIDER_THREAD_COUNT

See Also:
  Constant Field Values

### USE_DEFAULT_LISTENERS

    public static final java.lang.String USE_DEFAULT_LISTENERS

See Also:
  Constant Field Values

### SUITE_DEF_OPT

    public static final java.lang.String SUITE_DEF_OPT

See Also:
  Constant Field Values

Method Detail

### parseCommandLine

    public static java.util.Map parseCommandLine(java.lang.String[] originalArgv)

  Parses the command line options and returns a map from option string to parsed values. For example, if argv contains {..., "-sourcedir", "src/main", "-target", ...} then the map would contain an entry in which the key would be the "-sourcedir" String and the value would be the "src/main" String.

  Parameters:
    `originalArgv` - the command line options.
  Returns:
    the parsed parameters as a map from option string to parsed values.

### readFile

    public static java.util.List<java.lang.String> readFile(java.lang.String fileName)

  Reads the file specified by filename and returns the file content as a string. End of lines are replaced by a space

  Parameters:
    `fileName` - the command line filename
  Returns:
    the file content as a string.

### usage

    public static void usage()

  Prints the usage message to System.out. This message describes all the command line options.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD