Class JavaTestLoader

java.lang.Object
org.citrusframework.common.DefaultTestLoader
org.citrusframework.common.JavaTestLoader
All Implemented Interfaces:
org.citrusframework.common.TestLoader, org.citrusframework.common.TestSourceAware

public class JavaTestLoader extends DefaultTestLoader implements org.citrusframework.common.TestSourceAware
Test loader implementation able to compile a Java source file and run the test method
  • Constructor Details

    • JavaTestLoader

      public JavaTestLoader()
  • Method Details

    • doLoad

      public void doLoad()
      Description copied from class: DefaultTestLoader
      Subclasses are supposed to overwrite this method on order to add logic how to load the test case (e.g. from XML, Json, YAML).
      Overrides:
      doLoad in class DefaultTestLoader
    • getSource

      public org.citrusframework.TestSource getSource()
      Gets custom source file for the Java test case. If not set creates default context file path from testName and packageName.
    • getClassName

      public String getClassName()
    • setSource

      public void setSource(org.citrusframework.TestSource source)
      Sets custom source file for Java test case.
      Specified by:
      setSource in interface org.citrusframework.common.TestSourceAware