Package testsuite.config

Examples of testsuite.config.Server


                }
            };
            File configFile = new File(System.getProperty("testsuite.config", "tests.xml"));
            ConfigReader config = new ConfigReader(configFile);
            for ( Iterator servers = config.getServers().iterator(); servers.hasNext(); ) {
                final Server server = (Server)servers.next();
                final TestSuite serverSuite = new TestSuite((server.getName() + " " + server.getVersion()).replaceAll("\\.", "_")) {
                    public void run(TestResult result) {
                        currentBaseUrl = server.getBaseURL();
                        report.startServer(server);
                        super.run(result);
                        report.endServer();
                    }
                };
View Full Code Here


            writer.print("<title>" + title + "</title></head>");
            writer.print("<body>");
            writer.print("<table class='results'>");
            writer.print("<tr><td class='title'>" + title + "<br />" + new Date() + "</td>");
            for (Iterator iterator = servers.iterator(); iterator.hasNext();) {
                Server server = (Server) iterator.next();
                writer.print("<td class='server'>" + server.getName() + "<br />" + server.getVersion() + "</td>");
            }
            writer.print("</tr>");
            String lastTestClass = "";
            for (Iterator i1 = tests.iterator(); i1.hasNext();) {
                Test test = (Test) i1.next();
                String testName = test.toString();
                String testClass = testName.substring(testName.indexOf('(') + 1, testName.indexOf(')'));
                String testMethod = testName.substring(0, testName.indexOf('('));
                if (!lastTestClass.equals(testClass)) {
                    writer.print("<tr><td class='testClass' colspan='" + (servers.size() + 1) + "'>"
                        + testClass.substring(testClass.lastIndexOf('.') + 1).replaceAll("[A-Z]", " $0").trim() + "</td></tr>");
                    lastTestClass = testClass;
                }
                writer.print("<tr><td class='testMethod'>"
                    + testMethod.substring(4).replaceAll("[A-Z]", " $0").toLowerCase() + "</td>");
                for (Iterator i2 = servers.iterator(); i2.hasNext();) {
                    Server server = (Server) i2.next();
                    String error = (String) results.get(new Tuple(server, test));
                    if (error == null) {
                        writer.print("<td class='pass'>pass</td>");
                    } else {
                        writer.print("<td class='fail' title=\"" + TextUtils.htmlEncode(error)+ "\">FAIL</td>");
View Full Code Here

TOP

Related Classes of testsuite.config.Server

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.