Class XmlTest
java.lang.Object
org.testng.xml.XmlTest
- All Implemented Interfaces:
Cloneable
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidaddMetaGroup(String name, String... metaGroup) voidaddMetaGroup(String name, List<String> metaGroup) voidaddParameter(String key, String value) voidaddXmlDependencyGroup(String group, String dependsOn) clone()Clone thesourceXmlTestby including: - test attributes - groups definitions - parametersbooleanbooleanintgetIndex()Note that this attribute does not come from the XML file, it's calculated internally and represents the order in which this test tag was found in its <suite> tag.getInvocationNumbers(String method) Convenience method to cache the ordering numbers for methods.getName()getParameter(String name) final XmlSuitegetSuite()Returns the suite this test is part of.intlonggetTimeOut(long def) intinthashCode()booleanbooleannameMatchesAny(List<String> names) voidsetAllowReturnValues(Boolean allowReturnValues) voidsetClasses(List<XmlClass> c) voidvoidsetGroupByInstances(boolean f) voidvoidvoidsetIndex(int index) voidsetMetaGroups(Map<String, List<String>> metaGroups) voidsetMethodSelectors(List<XmlMethodSelector> methodSelectors) voidvoidvoidsetParallel(XmlSuite.ParallelMode parallel) voidsetParameters(Map<String, String> parameters) voidsetPreserveOrder(Boolean preserveOrder) voidvoidsetSkipFailedInvocationCounts(boolean skip) voidvoidsetThreadCount(int threadCount) voidsetTimeOut(long timeOut) voidsetVerbose(int v) voidsetXmlClasses(List<XmlClass> classes) Sets the XML Classes.voidsetXmlDependencyGroups(Map<String, String> xmlDependencyGroups) voidsetXmlPackages(List<XmlPackage> packages) voidsetXmlSuite(XmlSuite suite) boolean
-
Field Details
-
DEFAULT_TIMEOUT_MS
public static final int DEFAULT_TIMEOUT_MS- See Also:
-
-
Constructor Details
-
XmlTest
Constructs aXmlTestand adds it to suite's list of tests.- Parameters:
suite- the parent suite.index- the index of this test tag in testng.xml
-
XmlTest
-
XmlTest
public XmlTest()
-
-
Method Details
-
setXmlPackages
-
getXmlPackages
-
getPackages
-
setPackages
-
getMethodSelectors
-
setMethodSelectors
-
getSuite
Returns the suite this test is part of.- Returns:
- the suite this test is part of.
-
getIncludedGroups
-
isGroupFilteringDisabled
public boolean isGroupFilteringDisabled() -
getXmlClasses
-
getClasses
-
setClasses
-
setXmlClasses
-
getName
- Returns:
- Returns the name.
-
setName
- Parameters:
name- The name to set.
-
setVerbose
public void setVerbose(int v) - Parameters:
v- - Verbosity level.
-
getThreadCount
public int getThreadCount() -
setThreadCount
public void setThreadCount(int threadCount) -
setIncludedGroups
-
setExcludedGroups
-
getExcludedGroups
-
addIncludedGroup
-
addExcludedGroup
-
getVerbose
public int getVerbose()- Returns:
- Returns the verbose.
-
getGroupByInstances
public boolean getGroupByInstances() -
setGroupByInstances
public void setGroupByInstances(boolean f) -
setSkipFailedInvocationCounts
public void setSkipFailedInvocationCounts(boolean skip) -
skipFailedInvocationCounts
public boolean skipFailedInvocationCounts()- Returns:
- Returns the isJUnit.
-
addMetaGroup
-
addMetaGroup
-
setMetaGroups
-
getMetaGroups
-
setParameters
-
addParameter
-
getParameter
-
getAllParameters
-
getLocalParameters
-
setParallel
-
getParallel
-
getTimeOut
-
getTimeOut
public long getTimeOut(long def) -
setTimeOut
public void setTimeOut(long timeOut) -
setScript
-
getScript
-
toXml
-
clone
-
getInvocationNumbers
-
setPreserveOrder
-
getPreserveOrder
-
setSuite
-
getAllowReturnValues
-
setAllowReturnValues
-
getIndex
public int getIndex()Note that this attribute does not come from the XML file, it's calculated internally and represents the order in which this test tag was found in its <suite> tag. It's used to calculate the ordering of the tests when preserve-test-order is true.- Returns:
- The value
-
setIndex
public void setIndex(int index) -
hashCode
-
equals
-
addXmlDependencyGroup
-
getXmlDependencyGroups
-
setXmlDependencyGroups
-
setXmlSuite
-
setGroups
-
getXmlGroups
-
nameMatchesAny
-