Top Description Methods
org.testng

public Interface ITestMethodFinder

Known Direct Implementers
org.testng.internal.TestNGMethodFinder
Imports
org.testng.xml.XmlTest

This interface allows to modify the strategy used by TestRunner to find its test methods. At the time of this writing, TestNG supports two different strategies: TestNG (using annotations to locate these methods) and JUnit (setUp()/tearDown() and all methods that start with "test" or have a suite() method).
Author
Cedric Beust, May 3, 2004

Method Summary

Modifier and TypeMethod and Description
public ITestNGMethod[]

Returns:

All the methods that should be invoked after the test class has been created and after all its test methods have completed.
getAfterClassMethods
(Class<?>
The test class
cls
)

public ITestNGMethod[]
public ITestNGMethod[]

Returns:

All the methods that should be invoked after the suite has run all its tests.
getAfterSuiteMethods
(Class<?>
The test class
cls
)

public ITestNGMethod[]
public ITestNGMethod[]

Returns:

All the methods that should be invoked after a test method completes.
getAfterTestMethods
(Class<?>
The test class
cls
)

public ITestNGMethod[]

Returns:

All the methods that should be invoked after the test class has been created and before any of its test methods is invoked.
getBeforeClassMethods
(Class<?>
The test class
cls
)

public ITestNGMethod[]
public ITestNGMethod[]

Returns:

All the methods that should be invoked before the suite starts running.
getBeforeSuiteMethods
(Class<?>
The test class
cls
)

public ITestNGMethod[]
public ITestNGMethod[]

Returns:

All the methods that should be invoked before a test method is invoked.
getBeforeTestMethods
(Class<?>
The test class
cls
)

public ITestNGMethod[]

Returns:

All the applicable test methods.
getTestMethods
(Class<?>
The test class
cls
,
XmlTest
The test node of xml
xmlTest
)

Method Detail

getAfterClassMethodsback to summary
public ITestNGMethod[] getAfterClassMethods(Class<?> cls)
Parameters
cls:Class<?>

The test class

Returns:ITestNGMethod[]

All the methods that should be invoked after the test class has been created and after all its test methods have completed.

getAfterGroupsConfigurationMethodsback to summary
public ITestNGMethod[] getAfterGroupsConfigurationMethods(Class<?> testClass)
getAfterSuiteMethodsback to summary
public ITestNGMethod[] getAfterSuiteMethods(Class<?> cls)
Parameters
cls:Class<?>

The test class

Returns:ITestNGMethod[]

All the methods that should be invoked after the suite has run all its tests.

getAfterTestConfigurationMethodsback to summary
public ITestNGMethod[] getAfterTestConfigurationMethods(Class<?> testClass)
getAfterTestMethodsback to summary
public ITestNGMethod[] getAfterTestMethods(Class<?> cls)
Parameters
cls:Class<?>

The test class

Returns:ITestNGMethod[]

All the methods that should be invoked after a test method completes.

getBeforeClassMethodsback to summary
public ITestNGMethod[] getBeforeClassMethods(Class<?> cls)
Parameters
cls:Class<?>

The test class

Returns:ITestNGMethod[]

All the methods that should be invoked after the test class has been created and before any of its test methods is invoked.

getBeforeGroupsConfigurationMethodsback to summary
public ITestNGMethod[] getBeforeGroupsConfigurationMethods(Class<?> testClass)
getBeforeSuiteMethodsback to summary
public ITestNGMethod[] getBeforeSuiteMethods(Class<?> cls)
Parameters
cls:Class<?>

The test class

Returns:ITestNGMethod[]

All the methods that should be invoked before the suite starts running.

getBeforeTestConfigurationMethodsback to summary
public ITestNGMethod[] getBeforeTestConfigurationMethods(Class<?> testClass)
getBeforeTestMethodsback to summary
public ITestNGMethod[] getBeforeTestMethods(Class<?> cls)
Parameters
cls:Class<?>

The test class

Returns:ITestNGMethod[]

All the methods that should be invoked before a test method is invoked.

getTestMethodsback to summary
public ITestNGMethod[] getTestMethods(Class<?> cls, XmlTest xmlTest)
Parameters
cls:Class<?>

The test class

xmlTest:XmlTest

The test node of xml

Returns:ITestNGMethod[]

All the applicable test methods.