Class XmlSuite
java.lang.Object
org.testng.xml.XmlSuite
- All Implemented Interfaces:
Cloneable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumConfiguration failure policy options.static enumParallel modes. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Booleanstatic final XmlSuite.FailurePolicyWhether to SKIP or CONTINUE to re-attempt failed configuration methods.static final IntegerThread count for the data provider pool.static final BooleanBy default, a method failing will cause all instances of that class to skip.static final BooleanMixed mode flag.static final XmlSuite.ParallelModestatic final Booleanstatic final Booleanstatic final IntegerThe thread count.static final IntegerThe suite verbose flag (0 to 10).final UUIDRepresents a unique id for this suite. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidaddListener(String listener) voidclone()Note that this is not a full clone: XmlTest children are not cloned by this method.booleanReturns the configuration failure policy.intReturns the method selectors.getName()Returns the name.Class<? extends ITestObjectFactory> Returns the parallel mode.getParameter(String name) Returns the parameter defined in this suite only.Returns the suite files.getTest()Returns the test.getTests()Returns the tests.intReturns the timeout.longgetTimeOut(long def) Returns the timeout as a long value specifying the default value to be used if no timeout was specified.Returns the verbose.Returns the XML packages.inthashCode()booleanisParsed()booleanvoidonListenerElement(String className) voidonMethodSelectorElement(String language, String name, String priority) voidonPackagesElement(String name) voidonParameterElement(String name, String value) voidonSuiteFilesElement(String path) voidsetAllowReturnValues(Boolean allowReturnValues) voidsetConfigFailurePolicy(XmlSuite.FailurePolicy configFailurePolicy) Sets the configuration failure policy.voidsetDataProviderThreadCount(int count) voidvoidsetFileName(String fileName) voidsetGroupByInstances(boolean f) voidvoidsetGuiceStage(String guiceStage) voidvoidsetListeners(List<String> listeners) voidsetMethodSelectors(List<XmlMethodSelector> methodSelectors) Sets the method selectors.voidvoidSets the name.voidsetObjectFactoryClass(Class<? extends ITestObjectFactory> objectFactoryClass) voidsetPackages(List<XmlPackage> packages) voidsetParallel(XmlSuite.ParallelMode parallel) Sets the parallel mode.voidsetParameters(Map<String, String> parameters) Sets parameters.voidsetParentModule(String parentModule) voidsetParentSuite(XmlSuite parentSuite) voidsetParsed(boolean parsed) voidvoidsetShareThreadPoolForDataProviders(boolean shareThreadPoolForDataProviders) voidsetSkipFailedInvocationCounts(boolean skip) voidsetSuiteFiles(List<String> files) Sets the suite files.voidvoidsetThreadCount(int threadCount) Set the thread count.voidsetTimeOut(String timeOut) Sets the timeout.voidsetVerbose(Integer verbose) Set the verbose.voidvoidsetXmlPackages(List<XmlPackage> packages) Sets the XML packages.This method returns a shallow cloned version.voidshouldUseGlobalThreadPool(boolean flag) toString()toXml()boolean
-
Field Details
-
DEFAULT_VERBOSE
The suite verbose flag (0 to 10). -
DEFAULT_PARALLEL
-
SUITE_ID
Represents a unique id for this suite. Can be used for uniquely identifying the xml suite. -
DEFAULT_CONFIG_FAILURE_POLICY
Whether to SKIP or CONTINUE to re-attempt failed configuration methods. -
DEFAULT_MIXED
Mixed mode flag. -
DEFAULT_SKIP_FAILED_INVOCATION_COUNTS
-
DEFAULT_THREAD_COUNT
The thread count. -
DEFAULT_DATA_PROVIDER_THREAD_COUNT
Thread count for the data provider pool. -
DEFAULT_GROUP_BY_INSTANCES
By default, a method failing will cause all instances of that class to skip. -
DEFAULT_ALLOW_RETURN_VALUES
-
DEFAULT_PRESERVE_ORDER
-
-
Constructor Details
-
XmlSuite
public XmlSuite()
-
-
Method Details
-
setParsed
public void setParsed(boolean parsed) -
isParsed
public boolean isParsed()- Returns:
- -
trueif the currentXmlSuitehas already been parsed.
-
getFileName
- Returns:
- The fileName.
-
setFileName
- Parameters:
fileName- The fileName to set.
-
getParallel
-
getParentModule
-
getGuiceStage
-
getObjectFactoryClass
-
useGlobalThreadPool
public boolean useGlobalThreadPool() -
shouldUseGlobalThreadPool
public void shouldUseGlobalThreadPool(boolean flag) -
setObjectFactoryClass
-
setParallel
Sets the parallel mode.- Parameters:
parallel- The parallel mode.
-
setParentModule
-
setGuiceStage
-
setConfigFailurePolicy
Sets the configuration failure policy.- Parameters:
configFailurePolicy- The config failure policy.
-
getConfigFailurePolicy
Returns the configuration failure policy.- Returns:
- The configuration failure policy.
-
getVerbose
-
setVerbose
-
getName
-
setName
-
getTest
-
getTests
-
setTests
-
getMethodSelectors
Returns the method selectors.- Returns:
- The method selectors.
-
setMethodSelectors
Sets the method selectors.- Parameters:
methodSelectors- The method selectors.
-
setParameters
-
getParameters
-
getAllParameters
-
getParameter
-
getThreadCount
public int getThreadCount()- Returns:
- The threadCount.
-
setThreadCount
public void setThreadCount(int threadCount) Set the thread count.- Parameters:
threadCount- The thread count to set.
-
skipFailedInvocationCounts
-
setSkipFailedInvocationCounts
public void setSkipFailedInvocationCounts(boolean skip) -
setXmlPackages
Sets the XML packages.- Parameters:
packages- The XML packages.
-
getXmlPackages
-
getPackages
-
setMethodSelectors
-
setPackages
-
toXml
- Returns:
- A String representation of this XML suite.
-
getLocalListeners
-
setXmlMethodSelectors
-
getXmlMethodSelectors
-
toString
-
clone
-
shallowCopy
-
setTimeOut
-
getTimeOut
-
getTimeOut
public long getTimeOut(long def) Returns the timeout as a long value specifying the default value to be used if no timeout was specified.- Parameters:
def- The default value to be used if no timeout was specified.- Returns:
- The timeout as a long value specifying the default value to be used if no timeout was specified.
-
setSuiteFiles
-
getSuiteFiles
-
setListeners
-
getListeners
-
setDataProviderThreadCount
public void setDataProviderThreadCount(int count) -
getDataProviderThreadCount
public int getDataProviderThreadCount() -
setParentSuite
-
getParentSuite
-
getChildSuites
-
hashCode
-
equals
-
setPreserveOrder
-
getPreserveOrder
-
getIncludedGroups
- Returns:
- Returns the includedGroups. Note: do not modify the returned value, use
addIncludedGroup(String).
-
addIncludedGroup
-
setIncludedGroups
-
setExcludedGroups
-
getExcludedGroups
- Returns:
- Returns the excludedGroups. Note: do not modify the returned value, use
addExcludedGroup(String).
-
addExcludedGroup
-
getGroupByInstances
-
setGroupByInstances
public void setGroupByInstances(boolean f) -
addListener
-
getAllowReturnValues
-
setAllowReturnValues
-
setGroups
-
onParameterElement
-
onListenerElement
-
onSuiteFilesElement
-
onPackagesElement
-
onMethodSelectorElement
-
getGroups
-
addTest
-
getPackageNames
-