Top Description Inners Fields Constructors Methods
org.testng.internal

public Class TestNGMethodFinder

extends Object
implements ITestMethodFinder
Class Inheritance
All Implemented Interfaces
org.testng.ITestMethodFinder
Static Imports
org.testng.internal.TestNGMethodFinder.MethodType.*

The default strategy for finding test methods: look up annotations @Test in front of methods.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static enum

Field Summary

Modifier and TypeField and Description
private final IAnnotationFinder
private final Comparator<ITestNGMethod>
private static final Comparator<ITestNGMethod>
private final ITestObjectFactory
private final RunInfo

Constructor Summary

AccessConstructor and Description
public
TestNGMethodFinder(ITestObjectFactory objectFactory, RunInfo runInfo, IAnnotationFinder annotationFinder)

public
TestNGMethodFinder(ITestObjectFactory objectFactory, RunInfo runInfo, IAnnotationFinder annotationFinder, Comparator<ITestNGMethod> comparator)

Method Summary

Modifier and TypeMethod and Description
private void
addConfigurationMethod(Class<?> clazz, List<ITestNGMethod> results, Method method, boolean isBeforeSuite, boolean isAfterSuite, boolean isBeforeTest, boolean isAfterTest, boolean isBeforeClass, boolean isAfterClass, boolean isBeforeTestMethod, boolean isAfterTestMethod, boolean isIgnoreFailure, String[] beforeGroups, String[] afterGroups)

private ITestNGMethod[]
findConfiguration(final Class<?> clazz, final TestNGMethodFinder.MethodType configurationType)

public ITestNGMethod[]
public ITestNGMethod[]
public ITestNGMethod[]
public ITestNGMethod[]
public ITestNGMethod[]
public ITestNGMethod[]
public ITestNGMethod[]
public ITestNGMethod[]
public ITestNGMethod[]
public ITestNGMethod[]
public ITestNGMethod[]
getTestMethods(Class<?>
The test class
clazz
,
XmlTest
The test node of xml
xmlTest
)

Implements org.testng.ITestMethodFinder.getTestMethods.

private static boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

annotationFinderback to summary
private final IAnnotationFinder annotationFinder
comparatorback to summary
private final Comparator<ITestNGMethod> comparator
NO_COMPARISONback to summary
private static final Comparator<ITestNGMethod> NO_COMPARISON
objectFactoryback to summary
private final ITestObjectFactory objectFactory
runInfoback to summary
private final RunInfo runInfo

Constructor Detail

TestNGMethodFinderback to summary
public TestNGMethodFinder(ITestObjectFactory objectFactory, RunInfo runInfo, IAnnotationFinder annotationFinder)
TestNGMethodFinderback to summary
public TestNGMethodFinder(ITestObjectFactory objectFactory, RunInfo runInfo, IAnnotationFinder annotationFinder, Comparator<ITestNGMethod> comparator)

Method Detail

addConfigurationMethodback to summary
private void addConfigurationMethod(Class<?> clazz, List<ITestNGMethod> results, Method method, boolean isBeforeSuite, boolean isAfterSuite, boolean isBeforeTest, boolean isAfterTest, boolean isBeforeClass, boolean isAfterClass, boolean isBeforeTestMethod, boolean isAfterTestMethod, boolean isIgnoreFailure, String[] beforeGroups, String[] afterGroups)
findConfigurationback to summary
private ITestNGMethod[] findConfiguration(final Class<?> clazz, final TestNGMethodFinder.MethodType configurationType)
getAfterClassMethodsback to summary
public ITestNGMethod[] getAfterClassMethods(Class<?> cls)

Implements org.testng.ITestMethodFinder.getAfterClassMethods.

Parameters
cls:Class<?>

Doc from org.testng.ITestMethodFinder.getAfterClassMethods.

The test class

Returns:ITestNGMethod[]

Doc from org.testng.ITestMethodFinder.getAfterClassMethods.

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

Annotations
@Override
getAfterGroupsConfigurationMethodsback to summary
public ITestNGMethod[] getAfterGroupsConfigurationMethods(Class<?> clazz)

Implements org.testng.ITestMethodFinder.getAfterGroupsConfigurationMethods.

Annotations
@Override
getAfterSuiteMethodsback to summary
public ITestNGMethod[] getAfterSuiteMethods(Class<?> cls)

Implements org.testng.ITestMethodFinder.getAfterSuiteMethods.

Parameters
cls:Class<?>

Doc from org.testng.ITestMethodFinder.getAfterSuiteMethods.

The test class

Returns:ITestNGMethod[]

Doc from org.testng.ITestMethodFinder.getAfterSuiteMethods.

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

Annotations
@Override
getAfterTestConfigurationMethodsback to summary
public ITestNGMethod[] getAfterTestConfigurationMethods(Class<?> clazz)

Implements org.testng.ITestMethodFinder.getAfterTestConfigurationMethods.

Annotations
@Override
getAfterTestMethodsback to summary
public ITestNGMethod[] getAfterTestMethods(Class<?> cls)

Implements org.testng.ITestMethodFinder.getAfterTestMethods.

Parameters
cls:Class<?>

Doc from org.testng.ITestMethodFinder.getAfterTestMethods.

The test class

Returns:ITestNGMethod[]

Doc from org.testng.ITestMethodFinder.getAfterTestMethods.

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

Annotations
@Override
getBeforeClassMethodsback to summary
public ITestNGMethod[] getBeforeClassMethods(Class<?> cls)

Implements org.testng.ITestMethodFinder.getBeforeClassMethods.

Parameters
cls:Class<?>

Doc from org.testng.ITestMethodFinder.getBeforeClassMethods.

The test class

Returns:ITestNGMethod[]

Doc from org.testng.ITestMethodFinder.getBeforeClassMethods.

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

Annotations
@Override
getBeforeGroupsConfigurationMethodsback to summary
public ITestNGMethod[] getBeforeGroupsConfigurationMethods(Class<?> clazz)

Implements org.testng.ITestMethodFinder.getBeforeGroupsConfigurationMethods.

Annotations
@Override
getBeforeSuiteMethodsback to summary
public ITestNGMethod[] getBeforeSuiteMethods(Class<?> cls)

Implements org.testng.ITestMethodFinder.getBeforeSuiteMethods.

Parameters
cls:Class<?>

Doc from org.testng.ITestMethodFinder.getBeforeSuiteMethods.

The test class

Returns:ITestNGMethod[]

Doc from org.testng.ITestMethodFinder.getBeforeSuiteMethods.

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

Annotations
@Override
getBeforeTestConfigurationMethodsback to summary
public ITestNGMethod[] getBeforeTestConfigurationMethods(Class<?> clazz)

Implements org.testng.ITestMethodFinder.getBeforeTestConfigurationMethods.

Annotations
@Override
getBeforeTestMethodsback to summary
public ITestNGMethod[] getBeforeTestMethods(Class<?> cls)

Implements org.testng.ITestMethodFinder.getBeforeTestMethods.

Parameters
cls:Class<?>

Doc from org.testng.ITestMethodFinder.getBeforeTestMethods.

The test class

Returns:ITestNGMethod[]

Doc from org.testng.ITestMethodFinder.getBeforeTestMethods.

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

Annotations
@Override
getTestMethodsback to summary
public ITestNGMethod[] getTestMethods(Class<?> clazz, XmlTest xmlTest)

Implements org.testng.ITestMethodFinder.getTestMethods.

Parameters
clazz:Class<?>

Doc from org.testng.ITestMethodFinder.getTestMethods.

The test class

xmlTest:XmlTest

Doc from org.testng.ITestMethodFinder.getTestMethods.

The test node of xml

Returns:ITestNGMethod[]

Doc from org.testng.ITestMethodFinder.getTestMethods.

All the applicable test methods.

Annotations
@Override
shouldCreateBeforeAfterGroupback to summary
private static boolean shouldCreateBeforeAfterGroup(String[] groups, IAnnotationFinder finder, Class<?> clazz, IConfigurationAnnotation config)
org.testng.internal back to summary

pack-priv final Enum TestNGMethodFinder.MethodType

extends Enum<TestNGMethodFinder.MethodType>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final TestNGMethodFinder.MethodType
public static final TestNGMethodFinder.MethodType
public static final TestNGMethodFinder.MethodType
public static final TestNGMethodFinder.MethodType
public static final TestNGMethodFinder.MethodType
public static final TestNGMethodFinder.MethodType
public static final TestNGMethodFinder.MethodType
public static final TestNGMethodFinder.MethodType
public static final TestNGMethodFinder.MethodType
public static final TestNGMethodFinder.MethodType

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static TestNGMethodFinder.MethodType
public static TestNGMethodFinder.MethodType[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

AFTER_CLASSback to summary
public static final TestNGMethodFinder.MethodType AFTER_CLASS
AFTER_GROUPSback to summary
public static final TestNGMethodFinder.MethodType AFTER_GROUPS
AFTER_SUITEback to summary
public static final TestNGMethodFinder.MethodType AFTER_SUITE
AFTER_TESTback to summary
public static final TestNGMethodFinder.MethodType AFTER_TEST
AFTER_TEST_METHODback to summary
public static final TestNGMethodFinder.MethodType AFTER_TEST_METHOD
BEFORE_CLASSback to summary
public static final TestNGMethodFinder.MethodType BEFORE_CLASS
BEFORE_GROUPSback to summary
public static final TestNGMethodFinder.MethodType BEFORE_GROUPS
BEFORE_SUITEback to summary
public static final TestNGMethodFinder.MethodType BEFORE_SUITE
BEFORE_TESTback to summary
public static final TestNGMethodFinder.MethodType BEFORE_TEST
BEFORE_TEST_METHODback to summary
public static final TestNGMethodFinder.MethodType BEFORE_TEST_METHOD

Constructor Detail

MethodTypeback to summary
private MethodType()

Method Detail

valueOfback to summary
public static TestNGMethodFinder.MethodType valueOf(String name)
valuesback to summary
public static TestNGMethodFinder.MethodType[] values()