java.lang.Object
net.serenitybdd.junit.finder.TestFinder
- Direct Known Subclasses:
DataDrivenTestFinder
,DefaultTestFinder
,NormalTestFinder
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()
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
TestFinder
(String rootPackage) Create a new test finder instance that will look for tests in the packages underneath the given root package. -
Method Summary
-
Field Details
-
rootPackage
-
-
Constructor Details
-
TestFinder
Create a new test finder instance that will look for tests in the packages underneath the given root package.- Parameters:
rootPackage
- The root package used as the starting point when looking for test classes.
-
-
Method Details
-
thatFinds
-
getClasses
-
countTestMethods
public abstract int countTestMethods() -
findTestMethods
-
getAllTestClasses
-
getNormalTestClasses
-
getDataDrivenTestClasses
-
sorted
-
getAllTestMethods
-