CommandLineArgs.java revision 62a82c6aa5725c9e9d600af5ee06a5852100208c
1package org.testng;
2
3import com.beust.jcommander.Parameter;
4
5import org.testng.collections.Lists;
6
7import java.util.List;
8
9public class CommandLineArgs {
10
11  @Parameter(description = "The XML suite files to run")
12  public List<String> suiteFiles = Lists.newArrayList();
13
14  @Parameter(names = { "-log", "-verbose" }, description = "Level of verbosity")
15  public Integer verbose;
16
17  @Parameter(names = "-groups", description = "Comma-separated list of group names to be run")
18  public String groups;
19
20  @Parameter(names = "-excludedgroups", description ="Comma-separated list of group names to be " +
21  		"run")
22  public String excludedGroups;
23
24  @Parameter(names = "-d", description ="Output directory")
25  public String outputDirectory;
26
27  @Parameter(names = "-junit", description ="JUnit mode")
28  public Boolean junit = Boolean.FALSE;
29
30  @Parameter(names = "-listener", description = "List of .class files or list of class names" +
31      " implementing ITestListener or ISuiteListener")
32  public String listener;
33
34  @Parameter(names = "-methodselectors", description = "List of .class files or list of class " +
35  		"names implementing IMethodSelector")
36  public String methodSelectors;
37
38  @Parameter(names = "-objectfactory", description = "List of .class files or list of class " +
39  		"names implementing ITestRunnerFactory")
40  public String objectFactory;
41
42  @Parameter(names = "-parallel", description = "Parallel mode (methods, tests or classes)")
43  public String parallelMode;
44
45  @Parameter(names = "-configfailurepolicy", description = "Configuration failure policy (skip or continue)")
46  public String configFailurePolicy;
47
48  @Parameter(names = "-threadcount", description = "Number of threads to use when running tests " +
49      "in parallel")
50  public Integer threadCount;
51
52  @Parameter(names = "-dataproviderthreadcount", description = "Number of threads to use when " +
53      "running data providers")
54  public Integer dataProviderThreadCount;
55
56  @Parameter(names = "-suitename", description = "Default name of test suite, if not specified " +
57      "in suite definition file or source code")
58  public String suiteName;
59
60  @Parameter(names = "-testname", description = "Default name of test, if not specified in suite" +
61      "definition file or source code")
62  public String testName;
63
64  @Parameter(names = "-reporter", description = "Extended configuration for custom report listener")
65  public String reporter;
66
67  /**
68   * Used as map key for the complete list of report listeners provided with the above argument
69   */
70  @Parameter(names = "-reporterslist")
71  public String reportersList;
72
73  @Parameter(names = "-usedefaultlisteners", description = "Whether to use the default listeners")
74  public Boolean useDefaultListeners = Boolean.TRUE;
75
76  @Parameter(names = "-skipfailedinvocationcounts")
77  public Boolean skipFailedInvocationCounts;
78
79  @Parameter(names = "-testclass", description = "The list of test classes")
80  public String testClass;
81
82  @Parameter(names = "-testnames", description = "The list of test names to run")
83  public String testNames;
84
85  @Parameter(names = "-testjar", description = "")
86  public String testJar;
87
88  @Parameter(names = "-testRunFactory", description = "")
89  public String testRunFactory;
90
91  @Parameter(names = "-port", description = "The port")
92  public Integer port;
93
94  @Parameter(names = "-host", description = "The host")
95  public String host;
96
97  @Parameter(names = "-master", description ="Host where the master is")
98  public String master;
99
100  @Parameter(names = "-slave", description ="Host where the slave is")
101  public String slave;
102
103}
104