Class XmlTestLoader

  • All Implemented Interfaces:
    com.consol.citrus.common.TestLoader

    public class XmlTestLoader
    extends Object
    implements com.consol.citrus.common.TestLoader
    Loads test case as Spring bean from XML application context file. Loader holds application context file for test case and a parent application context. At runtime this class loads the Spring application context and gets test case bean instance from context.
    Since:
    2.1
    Author:
    Christoph Deppisch
    • Constructor Detail

      • XmlTestLoader

        public XmlTestLoader​(Class<?> testClass,
                             String testName,
                             String packageName,
                             com.consol.citrus.CitrusContext citrusContext)
        Default constructor with context file and parent application context field.
        Parameters:
        testClass -
        testName -
        packageName -
        citrusContext -
    • Method Detail

      • load

        public com.consol.citrus.TestCase load()
        Specified by:
        load in interface com.consol.citrus.common.TestLoader
      • getContextFile

        public String getContextFile()
        Gets custom Spring application context file for the XML test case. If not set creates default context file path from testName and packageName.
        Returns:
      • setContextFile

        public void setContextFile​(String contextFile)
        Sets custom Spring application context file for XML test case.
        Parameters:
        contextFile -