Package org.apache.sling.junit
Interface TestsProvider
public interface TestsProvider
Provides tests, for example by scanning bundles, finding test resources in a content repository, etc.
-
Method Summary
Modifier and TypeMethodDescriptionClass
<?> createTestClass
(String testName) Create a test class to execute the specified test.Deprecated.No longer used.Return the list of available testslong
Deprecated.No longer used.
-
Method Details
-
getServicePid
Deprecated.No longer used.Return this service's PID, client might use it later to instantiate a specific test.- Returns:
- the service pid or null
-
getTestNames
Return the list of available tests- Returns:
- the list of available tests
-
createTestClass
Create a test class to execute the specified test. The test executes in the same thread that calls this method, to allow using ThreadLocals to pass context to the test if needed.- Parameters:
testName
- the name of the test for which a test class needs to be created- Returns:
- the test class
- Throws:
ClassNotFoundException
- when the class cannot be created
-
lastModified
Deprecated.No longer used.TestManager
always gets the latest tests from theTestsProvider
instances. Any performance issues need to be addressed inside theTestsProvider
implementation, e.g. by caching.Return the timestamp at which our list of tests was last modified- Returns:
- the last modified date of the tests list as a timestamp or -1 if not supported
-