net.thucydides.junit.finder
Class TestFinder
java.lang.Object
net.thucydides.junit.finder.TestFinder
- Direct Known Subclasses:
- DataDrivenTestFinder, DefaultTestFinder, NormalTestFinder
public abstract class TestFinder
- extends Object
The TestFinder class lets you find the Thucydides tests or test methods underneath a given package.
You instantiate a TestFinder by providing the top-level package where the tests live.
You can then find the list of Thucydides test classes using getNormalTestClasses(), getDataDrivenTestClasses(),
and getAllTestClasses() (which returns both normal and data-driven tests).
You may also need to retrieve the list of test methods for a particular category of class. You can do this using the
getTestMethodsFrom() method, e.g.
new TestFinder("my.package").getTestMethodsFrom().normalTestClasses()
|
Constructor Summary |
protected |
TestFinder(String rootPackage)
Create a new test finder instance that will look for tests in the packages underneath the given root package. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
rootPackage
protected final String rootPackage
TestFinder
protected TestFinder(String rootPackage)
- Create a new test finder instance that will look for tests in the packages underneath the given root package.
thatFinds
public static TestFinderBuilderFactory thatFinds()
getClasses
public abstract List<Class<?>> getClasses()
countTestMethods
public abstract int countTestMethods()
findTestMethods
public TestMethodFinder findTestMethods()
getAllTestClasses
protected Set<Class<?>> getAllTestClasses()
getNormalTestClasses
protected Set<Class<?>> getNormalTestClasses()
getDataDrivenTestClasses
protected Set<Class<?>> getDataDrivenTestClasses()
sorted
protected List<Class<?>> sorted(List<Class<?>> classes)
getAllTestMethods
public List<Method> getAllTestMethods()
Copyright © 2011-2012 Wakaleo Consulting. All Rights Reserved.