Interface TestsProvider


public interface TestsProvider
Provides tests, for example by scanning bundles, finding test resources in a content repository, etc.
  • Method Details

    • getServicePid

      @Deprecated String 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

      List<String> getTestNames()
      Return the list of available tests
      Returns:
      the list of available tests
    • createTestClass

      Class<?> createTestClass(String testName) throws ClassNotFoundException
      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 long lastModified()
      Deprecated.
      No longer used. TestManager always gets the latest tests from the TestsProvider instances. Any performance issues need to be addressed inside the TestsProvider 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