public class TestCaseCollector extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
TestCaseCollector.TestCaseFilter
Determine if a class and its method should be accepted into test suite
|
Constructor and Description |
---|
TestCaseCollector(ClassLoader classLoader,
TestCaseCollector.TestCaseFilter filter) |
Modifier and Type | Method and Description |
---|---|
protected void |
addSingleTestMethod(Class<?> clazz,
String method) |
void |
addTestClass(String className)
Adds class to test by providing class name in string.
|
void |
addTestClass(String className,
String methodName)
Adds class to test by providing class name and method name in separate strings
|
void |
addTestClasses(List<String> classNames)
Adds classes to test by providing a list of class names in string
The class name may be in "
|
List<TestCase> |
getTestCases()
Gets the list of added test cases so far
|
public TestCaseCollector(ClassLoader classLoader, TestCaseCollector.TestCaseFilter filter)
public void addTestClasses(List<String> classNames) throws ClassNotFoundException
classNames
- class must be subclass of UiAutomatorTestCase
ClassNotFoundException
public void addTestClass(String className) throws ClassNotFoundException
className
- classes must be subclass of UiAutomatorTestCase
ClassNotFoundException
public void addTestClass(String className, String methodName) throws ClassNotFoundException
className
- class must be subclass of UiAutomatorTestCase
methodName
- may be null, in which case all "public void testNNN(void)" functions
will be addedClassNotFoundException
public List<TestCase> getTestCases()
TestCase