Package org.testng.internal
Class XmlMethodSelector
java.lang.Object
org.testng.internal.XmlMethodSelector
- All Implemented Interfaces:
IMethodSelector
This class is the default method selector used by TestNG to determine which methods need to be
included and excluded based on the specification given in testng.xml.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
includeMethod
(IMethodSelectorContext context, ITestNGMethod tm, boolean isTestMethod) void
setExcludedGroups
(Map<String, String> excludedGroups) void
setIncludedGroups
(Map<String, String> includedGroups) void
setOverrideIncludedMethods
(boolean overrideIncludedMethods) void
void
setTestMethods
(List<ITestNGMethod> testMethods) Invoked when all the test methods are known so that the method selector can perform additional work, such as adding the transitive closure of all the groups being included and depended upon.void
setXmlClasses
(List<XmlClass> classes)
-
Constructor Details
-
XmlMethodSelector
public XmlMethodSelector()
-
-
Method Details
-
includeMethod
public boolean includeMethod(IMethodSelectorContext context, ITestNGMethod tm, boolean isTestMethod) - Specified by:
includeMethod
in interfaceIMethodSelector
- Parameters:
context
- The selector context. The implementation of this method can invoke setHalted(true) to indicate that no other Method Selector should be invoked by TestNG after this one. Additionally, this implementation can manipulate the Map object returned by getUserData().tm
- The test methodisTestMethod
- true if this is a @Test method, false if it's a configuration method- Returns:
- true if this method should be included in the test run, false otherwise
-
setXmlClasses
-
getExcludedGroups
- Returns:
- Returns the excludedGroups.
-
getIncludedGroups
- Returns:
- Returns the includedGroups.
-
setExcludedGroups
- Parameters:
excludedGroups
- The excludedGroups to set.
-
setIncludedGroups
- Parameters:
includedGroups
- The includedGroups to set.
-
setScript
-
setTestMethods
Description copied from interface:IMethodSelector
Invoked when all the test methods are known so that the method selector can perform additional work, such as adding the transitive closure of all the groups being included and depended upon.- Specified by:
setTestMethods
in interfaceIMethodSelector
- Parameters:
testMethods
- The test methods
-
getOverrideIncludedMethods
public boolean getOverrideIncludedMethods() -
setOverrideIncludedMethods
public void setOverrideIncludedMethods(boolean overrideIncludedMethods)
-