Class DefaultZatsEnvironment

    • Constructor Detail

      • DefaultZatsEnvironment

        public DefaultZatsEnvironment()
        Create a zats context, it uses built-in config file(web.xml, zk.xml) to init the context quickly and safely.
      • DefaultZatsEnvironment

        public DefaultZatsEnvironment​(String webInfPathOrUrl)
        Create a zats Environment.
        The webInfPathOrUrl is the folder of the WEB-INF to start the zats environment.
        Parameters:
        webInfPathOrUrl - the folder of WEB-INF, a null value means use built-in WEB-INF folder.
      • DefaultZatsEnvironment

        public DefaultZatsEnvironment​(String webInfPathOrUrl,
                                      String contextPath)
        Create a zats Environment.
        The webInfPathOrUrl is the folder of the WEB-INF to start the zats environment, for example "./src/test/resources/web/WEB-INF".
        The contextPath is the path of the application context, for example "/" or "/myapp".
        Parameters:
        webInfPathOrUrl - the folder of WEB-INF, a null value means suing built-in WEB-INF folder.
        contextPath - the name of the application, a null value means using "/"
    • Method Detail

      • init

        public void init​(String resourceRoot)
        Description copied from interface: ZatsEnvironment
        initialize testing environment
        Specified by:
        init in interface ZatsEnvironment
        Parameters:
        resourceRoot - the resource root folder of the zul, it is usually the web content folder.
      • destroy

        public void destroy()
        Description copied from interface: ZatsEnvironment
        destroy this environment to release the resource.
        Specified by:
        destroy in interface ZatsEnvironment
      • cleanup

        public void cleanup()
        close all clients and release resources.
        Specified by:
        cleanup in interface ZatsEnvironment