Package org.apache.cactus.container

Examples of org.apache.cactus.container.ContainerRunner


        }

        this.container.setAntTaskFactory(new DefaultAntTaskFactory(
                getProject(), getTaskName(),
                getLocation(), getOwningTarget()));
        ContainerRunner runner = new ContainerRunner(this.container);
        runner.setLogger(new AntLogger(getProject()));
        runner.setURL(this.testURL);
        runner.setTimeout(this.timeout);
        runner.startUpContainer();
        try
        {
            this.testHook.execute();
        }
        finally
        {
            runner.shutDownContainer();
        }
    }
View Full Code Here


    private void executeInContainer(ContainerWrapper theWrapper,
        DeployableFile theFile)
    {
        super.init();
        log("Starting up container", Project.MSG_VERBOSE);
        ContainerRunner runner = new ContainerRunner(theWrapper);
        runner.setLogger(new AntLogger(getProject()));
        try
        {
            URL url = new URL(theWrapper.getBaseURL() + "/"
                + theFile.getTestContext()
                + theFile.getServletRedirectorMapping()
                + "?Cactus_Service=RUN_TEST");
            runner.setURL(url);
        
            runner.startUpContainer();
            log("Server name retrieved from 'Server' HTTP header: ["
                + runner.getServerName() + "]", Project.MSG_VERBOSE);
            try
            {
                Enumeration tests = getIndividualTests();
                while (tests.hasMoreElements())
                {
                    JUnitTest test = (JUnitTest) tests.nextElement();
                    if (test.shouldRun(getProject())
                     && !theWrapper.isExcluded(test.getName()))
                    {
                        test.setFork(true);
                        if (theWrapper.getToDir() != null)
                        {
                            test.setTodir(theWrapper.getToDir());
                        }
                        execute(test);
                    }
                }
            }
            finally
            {
                log("Shutting down container", Project.MSG_VERBOSE);
                runner.shutDownContainer();
                log("Container shut down", Project.MSG_VERBOSE);
            }
        }
        catch (MalformedURLException mue)
        {
View Full Code Here

TOP

Related Classes of org.apache.cactus.container.ContainerRunner

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.