Top Description Inners Fields Constructors Methods
org.testng.xml

public Class XmlSuite

extends Object
implements Cloneable
Class Inheritance
All Implemented Interfaces
java.lang.Cloneable
Imports
java.util.Collection, .Collections, .List, .Locale, .Map, .Set, .UUID, org.testng.ITestObjectFactory, org.testng.collections.Lists, .Maps, org.testng.internal.RuntimeBehavior, .Utils, org.testng.util.Strings

This class describes the tag <suite> in testng.xml.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
XmlSuite.FailurePolicy

Configuration failure policy options.

public static enum
XmlSuite.ParallelMode

Parallel modes.

Field Summary

Modifier and TypeField and Description
public static final Boolean
public static final XmlSuite.FailurePolicy
DEFAULT_CONFIG_FAILURE_POLICY

Whether to SKIP or CONTINUE to re-attempt failed configuration methods.

public static final Integer
DEFAULT_DATA_PROVIDER_THREAD_COUNT

Thread count for the data provider pool.

public static final Boolean
DEFAULT_GROUP_BY_INSTANCES

By default, a method failing will cause all instances of that class to skip.

public static final Boolean
DEFAULT_MIXED

Mixed mode flag.

public static final XmlSuite.ParallelMode
public static final Boolean
public static final Boolean
private static final String
DEFAULT_SUITE_NAME

The default suite name TODO CQ is this OK as a default name.

public static final Integer
DEFAULT_THREAD_COUNT

The thread count.

public static final Integer
DEFAULT_VERBOSE

The suite verbose flag (0 to 10).

private Boolean
private final List<XmlSuite>
m_childSuites

List of child XML suites specified using <suite-file> tags.

private XmlSuite.FailurePolicy
private int
private String
m_fileName

Name of the XML file.

private Boolean
private String
private List<String>
private List<XmlMethodSelector>
m_methodSelectors

Suite level method selectors.

private String
m_name

The suite name (defaults to DEFAULT_SUITE_NAME).

private Class<? extends ITestObjectFactory>
private XmlSuite.ParallelMode
private Map<String, String>
m_parameters

Suite level parameters.

private String
private XmlSuite
m_parentSuite

Parent XML suite if this suite was specified in another suite using <suite-file> tag.

private Boolean
private Boolean
private List<String>
private String
private List<XmlTest>
m_tests

Tests in suite.

private int
private String
m_timeOut

Time out for methods/tests.

private Integer
private XmlGroups
private XmlMethodSelectors
private List<XmlPackage>
m_xmlPackages

The packages containing test classes.

private boolean
private boolean
public final UUID
SUITE_ID

Represents a unique id for this suite.

private boolean

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
public void
public void
addListener(String listener)

public void
public Object
clone()

Overrides java.lang.Object.clone.

Creates and returns a copy of this object.
public boolean
equals(Object
the reference object with which to compare.
obj
)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.
pack-priv static boolean
f()

Used to debug equals() bugs.

public Boolean
public Map<String, String>

Returns:

The parameters defined in this suite and all its XmlTests.
getAllParameters
()

public List<XmlSuite>
public XmlSuite.FailurePolicy

Returns:

The configuration failure policy.
getConfigFailurePolicy
()

Returns the configuration failure policy.

public int
public List<String>

Returns:

Returns the excludedGroups.

Note

do not modify the returned value, use addExcludedGroup(String).

getExcludedGroups
()

public String

Returns:

The fileName.
getFileName
()

public Boolean
public XmlGroups
public String
public List<String>

Returns:

Returns the includedGroups.

Note

do not modify the returned value, use addIncludedGroup(String).

getIncludedGroups
()

public List<String>
public List<String>

Returns:

- The list of listener names that are local to the current <suite>.
getLocalListeners
()

public List<XmlMethodSelector>

Returns:

The method selectors.
getMethodSelectors
()

Returns the method selectors.

public String

Returns:

The name.
getName
()

Returns the name.

public Class<? extends ITestObjectFactory>
public Collection<String>
public List<XmlPackage>
public XmlSuite.ParallelMode

Returns:

The parallel mode.
getParallel
()

Returns the parallel mode.

public String

Returns:

The parameter defined in this suite only.
getParameter
(String
The parameter name.
name
)

Returns the parameter defined in this suite only.

public Map<String, String>

Returns:

the parameters that apply to tests in this suite.
The set of parameters for a suite is appended with parameters from the parent suite. Also, parameters from this suite override the same named parameters from the parent suite.
getParameters
()

public String
public XmlSuite
public Boolean
public List<String>

Returns:

The suite files.
getSuiteFiles
()

Returns the suite files.

public String

Returns:

The test.
getTest
()

Returns the test.

public List<XmlTest>

Returns:

The tests.
getTests
()

Returns the tests.

public int

Returns:

The threadCount.
getThreadCount
()

public String

Returns:

The timeout.
getTimeOut
()

Returns the timeout.

public long

Returns:

The timeout as a long value specifying the default value to be used if no timeout was specified.
getTimeOut
(long
The default value to be used if no timeout was specified.
def
)

Returns the timeout as a long value specifying the default value to be used if no timeout was specified.

public Integer

Returns:

The verbose.
getVerbose
()

Returns the verbose.

public XmlMethodSelectors
public List<XmlPackage>

Returns:

The XML packages.
getXmlPackages
()

Returns the XML packages.

public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.
private void
public boolean

Returns:

- true if the current XmlSuite has already been parsed.
isParsed
()

public boolean
public void
public void
onMethodSelectorElement(String language, String name, String priority)

public void
public void
public void
public void
setAllowReturnValues(Boolean allowReturnValues)

public void
setConfigFailurePolicy(XmlSuite.FailurePolicy
The config failure policy.
configFailurePolicy
)

Sets the configuration failure policy.

public void
public void
setExcludedGroups(List<String>
The excludedGrousps to set.
g
)

public void
setFileName(String
The fileName to set.
fileName
)

public void
public void
setGroups(XmlGroups xmlGroups)

public void
setGuiceStage(String guiceStage)

public void
setIncludedGroups(List<String>
- The list of groups to include.
g
)

public void
setListeners(List<String> listeners)

public void
setMethodSelectors(List<XmlMethodSelector>
The method selectors.
methodSelectors
)

Sets the method selectors.

public void
public void
setName(String
The name to set.
name
)

Sets the name.

public void
setObjectFactoryClass(Class<? extends ITestObjectFactory> objectFactoryClass)

public void
public void
setParallel(XmlSuite.ParallelMode
The parallel mode.
parallel
)

Sets the parallel mode.

public void
setParameters(Map<String, String>
The parameters.
parameters
)

Sets parameters.

public void
setParentModule(String parentModule)

public void
setParentSuite(XmlSuite parentSuite)

public void
setParsed(boolean parsed)

public void
public void
setShareThreadPoolForDataProviders(boolean shareThreadPoolForDataProviders)

public void
public void
setSuiteFiles(List<String>
The suite files.
files
)

Sets the suite files.

public void
public void
setThreadCount(int
The thread count to set.
threadCount
)

Set the thread count.

public void
setTimeOut(String
The timeout.
timeOut
)

Sets the timeout.

public void
setVerbose(Integer
The verbose to set.
verbose
)

Set the verbose.

public void
public void
setXmlPackages(List<XmlPackage>
The XML packages.
packages
)

Sets the XML packages.

public XmlSuite

Returns:

- A shallow copied version of XmlSuite.
shallowCopy
()

This method returns a shallow cloned version.

public void
public Boolean
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
public String

Returns:

A String representation of this XML suite.
toXml
()

private void
updateParameters()

Updates the list of parameters that apply to this XML suite.

public boolean
Inherited from java.lang.Object:
finalizegetClassnotifynotifyAllwaitwaitwait