Interface TestLoader


public interface TestLoader
Test loader interface.
Since:
2.1
Author:
Christoph Deppisch
  • Field Details

  • Method Details

    • load

      void load()
      Loads and creates new test case object.
    • configureTestCase

      void configureTestCase(Consumer<TestCase> handler)
      Adds test case handler that is called before test case gets executed.
      Parameters:
      handler -
    • doWithTestCase

      void doWithTestCase(Consumer<TestCase> handler)
      Adds test case handler that is called once the test case has been loaded.
      Parameters:
      handler -
    • setTestClass

      void setTestClass(Class<?> testClass)
    • setTestName

      void setTestName(String testName)
    • setPackageName

      void setPackageName(String packageName)
    • getTestCase

      TestCase getTestCase()
      Gets the loaded test case or null if it has not been loaded yet.
      Returns:
    • lookup

      static Map<String,TestLoader> lookup()
      Resolves all available test loader from resource path lookup. Scans classpath for test loader meta information and instantiates the components.
      Returns:
    • lookup

      static Optional<TestLoader> lookup(String loader)
      Resolves test loader from resource path lookup with given resource name. Scans classpath for test loader meta information with given name and returns instance of the loader. Returns optional instead of throwing exception when no test loader could be found.
      Parameters:
      loader -
      Returns: