From: Jani Laakso Date: Wed, 19 Dec 2007 10:06:02 +0000 (+0000) Subject: ATF is now TT (Testing Tools). X-Git-Tag: 6.7.0.beta1~5217 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=07422c5042bd01869ea38b504127920ba5d5fa18;p=vaadin-framework.git ATF is now TT (Testing Tools). svn changeset:3263/svn branch:trunk --- diff --git a/WebContent/WEB-INF/web.xml b/WebContent/WEB-INF/web.xml index b2bbb36184..f1a7ac9f57 100644 --- a/WebContent/WEB-INF/web.xml +++ b/WebContent/WEB-INF/web.xml @@ -11,6 +11,21 @@ IT Mill Toolkit examples + + + testingToolsActive + true + IT Mill Testing Tools activation + + + + ITMillToolkitApplicationRunner com.itmill.toolkit.terminal.gwt.server.ApplicationServlet diff --git a/build/package/WebContent/WEB-INF/web.xml b/build/package/WebContent/WEB-INF/web.xml index 6b41c1198e..6fed0561d2 100644 --- a/build/package/WebContent/WEB-INF/web.xml +++ b/build/package/WebContent/WEB-INF/web.xml @@ -11,6 +11,21 @@ IT Mill Toolkit examples + + + testingToolsActive + true + IT Mill Testing Tools activation + + + + ITMillToolkitApplicationRunner com.itmill.toolkit.terminal.gwt.server.ApplicationServlet diff --git a/src/com/itmill/toolkit/terminal/gwt/client/ApplicationConnection.java b/src/com/itmill/toolkit/terminal/gwt/client/ApplicationConnection.java index 46772298fe..bfc55cc196 100755 --- a/src/com/itmill/toolkit/terminal/gwt/client/ApplicationConnection.java +++ b/src/com/itmill/toolkit/terminal/gwt/client/ApplicationConnection.java @@ -112,7 +112,7 @@ public class ApplicationConnection { $wnd.itmill.gwtClient.hasActiveRequest = function() { return ap.@com.itmill.toolkit.terminal.gwt.client.ApplicationConnection::hasActiveRequest()(); } - $wnd.itmill.startATF(testServerUri); + $wnd.itmill.startTT(testServerUri); }-*/; public static Console getConsole() { diff --git a/src/com/itmill/toolkit/terminal/gwt/server/ApplicationServlet.java b/src/com/itmill/toolkit/terminal/gwt/server/ApplicationServlet.java index f116ee25b7..9c3e25437e 100644 --- a/src/com/itmill/toolkit/terminal/gwt/server/ApplicationServlet.java +++ b/src/com/itmill/toolkit/terminal/gwt/server/ApplicationServlet.java @@ -190,7 +190,7 @@ public class ApplicationServlet extends HttpServlet { } debugMode = debug; - // Gets ATF parameters if feature is activated + // Gets Testing Tools parameters if feature is activated if (getApplicationOrSystemProperty("testingToolsActive", "false") .equals("true")) { testingToolsActive = true; @@ -713,36 +713,38 @@ public class ApplicationServlet extends HttpServlet { private void writeTestingToolsScripts(Writer page, HttpServletRequest request) throws IOException { - // ATF script and CSS files are served from ATFServer + // Testing Tools script and CSS files are served from Testing Tools + // Server String ext = getTestingToolsUri(request); ext = ext.substring(0, ext.lastIndexOf('/')); - page.write("\n"); - page.write("\n"); - if (request.getParameter("ATF-TC") != null - || request.getParameter("ATF-TS") != null) { - proxyTestCases(request.getParameter("ATF-TC"), request - .getParameter("ATF-TS"), request - .getParameter("ATF-TS-RUN-ID"), page, + if (request.getParameter("TT-TC") != null + || request.getParameter("TT-TS") != null) { + proxyTestCases(request.getParameter("TT-TC"), request + .getParameter("TT-TS"), request + .getParameter("TT-TS-RUN-ID"), page, getTestingToolsUri(request)); } } private String getTestingToolsUri(HttpServletRequest request) { if (testingToolsServerUri == null) { - // Default behavior is that ATFServer application exists on - // same application server as current application does. + // Default behavior is that Testing Tools Server application exists + // on same application server as current application does. testingToolsServerUri = "http" + (request.isSecure() ? "s" : "") + "://" + request.getServerName() + ":" - + request.getLocalPort() + "/ATF/ATFServer"; + + request.getLocalPort() + + "/TestingTools/TestingToolsServer"; } return testingToolsServerUri; } /** - * Fetches testcase or testsuite scripts from ATF server and injects script - * to AUT client + * Fetches testcase or testsuite scripts from Testing Tools server and + * injects script to AUT client * * @param testCaseId * @param testSuiteId @@ -758,13 +760,13 @@ public class ApplicationServlet extends HttpServlet { URLConnection conn; if (testCaseId != null) { - testServerUri += "/ATF-TC/" + testCaseId; + testServerUri += "/TT-TC/" + testCaseId; } if (testSuiteId != null) { - testServerUri += "/ATF-TS/" + testSuiteId; + testServerUri += "/TT-TS/" + testSuiteId; } if (testSuiteRunId != null) { - testServerUri += "/ATF-TS-RUN-ID/" + testSuiteRunId; + testServerUri += "/TT-TS-RUN-ID/" + testSuiteRunId; } conn = new URL(testServerUri).openConnection(); @@ -778,10 +780,10 @@ public class ApplicationServlet extends HttpServlet { is.close(); if (builder != null && builder.length() > 0 - && builder.toString().startsWith("ATF-TC=")) { + && builder.toString().startsWith("TT-TC=")) { int lineEnd = builder.indexOf("\n"); String returnedTestCaseId = builder.substring(builder - .indexOf("ATF-TC=") + 7, lineEnd); + .indexOf("TT-TC=") + 7, lineEnd); builder.replace(0, lineEnd + 1, ""); String returnedTestSuiteRunId = null; @@ -789,7 +791,7 @@ public class ApplicationServlet extends HttpServlet { if (testSuiteId != null) { lineEnd = builder.indexOf("\n"); returnedTestSuiteRunId = builder.substring(builder - .indexOf("ATF-TS-RUN-ID=") + 14, lineEnd); + .indexOf("TT-TS-RUN-ID=") + 14, lineEnd); } if (builder.length() < lineEnd + 1) { @@ -801,22 +803,20 @@ public class ApplicationServlet extends HttpServlet { page .write("\n"); } }