Package org.testng.junit
Class JUnitMethodFinder
java.lang.Object
org.testng.junit.JUnitMethodFinder
- All Implemented Interfaces:
ITestMethodFinder
This class locates all test and configuration methods according to JUnit. It is used to change
the strategy used by TestRunner to locate its test methods.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAfterGroupsConfigurationMethods
(Class testClass) getAfterTestConfigurationMethods
(Class testClass) getAfterTestMethods
(Class cls) getBeforeGroupsConfigurationMethods
(Class testClass) getBeforeTestConfigurationMethods
(Class testClass) getTestMethods
(Class cls, XmlTest xmlTest) private ITestNGMethod[]
privateFindTestMethods
(INameFilter filter, Class cls)
-
Field Details
-
m_testName
-
m_annotationFinder
-
-
Constructor Details
-
JUnitMethodFinder
-
-
Method Details
-
getTestMethods
- Specified by:
getTestMethods
in interfaceITestMethodFinder
- Parameters:
cls
- The test classxmlTest
- The test node of xml- Returns:
- All the applicable test methods.
-
privateFindTestMethods
-
getBeforeTestMethods
- Specified by:
getBeforeTestMethods
in interfaceITestMethodFinder
- Parameters:
cls
- The test class- Returns:
- All the methods that should be invoked before a test method is invoked.
-
getAfterTestMethods
- Specified by:
getAfterTestMethods
in interfaceITestMethodFinder
- Parameters:
cls
- The test class- Returns:
- All the methods that should be invoked after a test method completes.
-
getAfterClassMethods
- Specified by:
getAfterClassMethods
in interfaceITestMethodFinder
- Parameters:
cls
- The test class- Returns:
- All the methods that should be invoked after the test class has been created and after all its test methods have completed.
-
getBeforeClassMethods
- Specified by:
getBeforeClassMethods
in interfaceITestMethodFinder
- Parameters:
cls
- The test class- Returns:
- All the methods that should be invoked after the test class has been created and before any of its test methods is invoked.
-
getBeforeSuiteMethods
- Specified by:
getBeforeSuiteMethods
in interfaceITestMethodFinder
- Parameters:
cls
- The test class- Returns:
- All the methods that should be invoked before the suite starts running.
-
getAfterSuiteMethods
- Specified by:
getAfterSuiteMethods
in interfaceITestMethodFinder
- Parameters:
cls
- The test class- Returns:
- All the methods that should be invoked after the suite has run all its tests.
-
getBeforeTestConfigurationMethods
- Specified by:
getBeforeTestConfigurationMethods
in interfaceITestMethodFinder
-
getAfterTestConfigurationMethods
- Specified by:
getAfterTestConfigurationMethods
in interfaceITestMethodFinder
-
getBeforeGroupsConfigurationMethods
- Specified by:
getBeforeGroupsConfigurationMethods
in interfaceITestMethodFinder
-
getAfterGroupsConfigurationMethods
- Specified by:
getAfterGroupsConfigurationMethods
in interfaceITestMethodFinder
-