Top Description Methods
org.testng

public Interface IMethodSelector

Known Direct Implementers
org.testng.internal.XmlMethodSelector
Imports
java.util.List

This interface is used to augment or replace TestNG's algorithm to decide whether a test method should be included in a test run.

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

true if this method should be included in the test run, false otherwise
includeMethod
(IMethodSelectorContext
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().
context
,
ITestNGMethod
The test method
method
,
boolean
true if this is a @Test method, false if it's a configuration method
isTestMethod
)

public void
setTestMethods(List<ITestNGMethod>
The test methods
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.

Method Detail

includeMethodback to summary
public boolean includeMethod(IMethodSelectorContext context, ITestNGMethod method, boolean isTestMethod)
Parameters
context:IMethodSelectorContext

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().

method:ITestNGMethod

The test method

isTestMethod:boolean

true if this is a @Test method, false if it's a configuration method

Returns:boolean

true if this method should be included in the test run, false otherwise

setTestMethodsback to summary
public 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.

Parameters
testMethods:List<ITestNGMethod>

The test methods