diff --git a/applications/content/data/ContentTypeData.xml b/applications/content/data/ContentTypeData.xml index 1f57d0492c..d43a0b9f0a 100644 --- a/applications/content/data/ContentTypeData.xml +++ b/applications/content/data/ContentTypeData.xml @@ -267,5 +267,5 @@ under the License. - + diff --git a/framework/testtools/build.xml b/framework/testtools/build.xml index bc3ef58aca..db7707d8ac 100644 --- a/framework/testtools/build.xml +++ b/framework/testtools/build.xml @@ -32,6 +32,7 @@ under the License. + diff --git a/framework/testtools/config/seleniumXml.properties b/framework/testtools/config/seleniumXml.properties index ac5f3ad00b..8cc918d10f 100644 --- a/framework/testtools/config/seleniumXml.properties +++ b/framework/testtools/config/seleniumXml.properties @@ -1,5 +1,5 @@ serverHost=localhost proxyPort=4444 -browser=*firefox +browser=*firefox /usr/lib/firefox-3.0.14/firefox startUrl=http://localhost:8080/ -log4jFile=./config/log4j.properties +log4jFile=./config/log4j.properties \ No newline at end of file diff --git a/framework/testtools/documents/OfbizSeleniumIntro.xml b/framework/testtools/documents/OfbizSeleniumIntro.xml new file mode 100644 index 0000000000..502d9be642 --- /dev/null +++ b/framework/testtools/documents/OfbizSeleniumIntro.xml @@ -0,0 +1,92 @@ + + +
+ + OFBiz SeleniumXml Introduction + + This is a short document to help you get started using SeleniumXml to test your OFBiz application. Here is a copy of the presentation that was given at the ApacheCon2008 OFBiz Conference that describes more about the project:http://us.apachecon.com/presentation/materials/118/ApacheCon2008_SeleniumXml.pdf + +
+ Installing SeleniumXml + 1. From the ofbiz directory run the following ant command to download the needed selenium- server.jar file. + 2. ant download-selenium + 3. ant run-install-extseed (For run install help data and example test) + 4. Build the source by running “ant” in the testtools directory or your OFBIZ_HOME + You should now have everything you need to run a seleniumXml test. +
+ +
+ Running the Example Test + + SeleniumXml requires the selenium server to be running. The selenium server uses a default proxy port of 4444. The default port can be changed when you start the server. Selenium tries to automatically change the proxy settings in the testing browser. If you are getting communication errors with the server you may have to manually change your proxy settings in your browser. +
+ 1. Start ofbiz as normal. + Note: Before run ofbiz with selenium should changes ofbiz to use HTTP as the default at file (framework/webapp/config/url.properties) . Instead everything just works through port 8080. Selenium supports https but it is more complicated so for this introduction I have turned https off. +
+
+ 2. Start the selenium server: + runSeleniumServer.bat / runSeleniumServer.sh +
+
+ 3. Change the configuration for your preferred browser in the testtools/config/seleniumxml.properties file. The default is firefox (e.g. browser=*firefox) but you can change it to any of the selenium supported browsers. + Selenium supported browsers: http://seleniumhq.org/about/platforms.html#browsers +
+
+ 4. Run the Example test +
+ 4.1 run the Example test .bat/.sh file + runSeleniumXml.bat / runSeleniumXml.sh testdef/seleniumxml/example/example_testsuite.xml + The above test combines three different tests into a single test suite. Data is passed from one test to another to allow you to share generated data. + You will get an assertion (or other exception) if the test fails. + The test uses a .5 second delay for demo purposes. (see example_testsuite.xml and the setSpeed value="500" command). You can remove this at the start of the test if you don't want the delay + - Here are some screen shots of what you should be seeing. + +
+
+ 4.2 run the Example test webtools/Run Selenium + + First you need to open the file example_testsuite.xml and comment out first part.. and enable the bottom one + Here is another way to run the selenium test suite and you can create new test suite for your web application. Scroll up on this page then you will see the link "Run Selenium" next to "Selenium Intro" click on that link. + On that page you will see the list of available test suites. So you can click on "Run" to run the test suite you want but please remember that the Selenium server should be started before you "run" any test. + You can also create new test suite by fill in the information to the form and put the directory location of your test suite in the field "Test Suite Path" then submit. If you want to know how the test is created you can take a look at the file example_testsuite.xml for more info. + +
+
+
+
+ Creating New Tests : + The easiest way to create a new test is to use the Selenium IDE plugin for Firefox. This allows you to records your own Selenium tests. You can then save the test and convert it to a seleniumXml test easily. + 1. Install the latest plugin at http://seleniumhq.org/projects/ide/ + 2. Record your steps as you run through your ofbiz application. + 3. Then convert the saved XML file using the convertSeleniumIDE.bat script. +
+
+ For example: + 1. convertSeleniumIDE.bat testdef/seleniumxml/example/recorded/AjaxExample.html testdef/seleniumxml/example/recorded/AjaxExample.xml + 2. Manually modify the commands to suit your needs. +
+
\ No newline at end of file diff --git a/framework/testtools/documents/OfbizSeleniumSetupHTTPS.xml b/framework/testtools/documents/OfbizSeleniumSetupHTTPS.xml new file mode 100644 index 0000000000..12f6698215 --- /dev/null +++ b/framework/testtools/documents/OfbizSeleniumSetupHTTPS.xml @@ -0,0 +1,154 @@ + + +
+
+ OFBiz SeleniumXml Introduction with HTTPS + How to setup in firefox browser? + + The problem for https is that the selenium­RC 1.0 and later will be runs in a separate profile + automatically when the Selenium test is opening a new session for the Firefox browser the browser will + need a security certificate every time. When this occurs the browser displays security pop up, and these + pop up cannot be closed using Selenium­RC . So how to solve this? + + + Create a separate Firefox profile for your tests ( adding a https certificate or install some add­ons) + +
+ For Ubuntu Linux : + - Make sure all your Firefox instances are closed . + - Open a new Terminal and type the command firefox -p -no-remote in the terminal then press enter. The pop up window will appear. + + + + After that click “Start Firefox” and configure settings based on suggestion below + +
+ warrning* + + Be sure to put your profile in a new folder separate from the default!!! + + + The Firefox profile manager tool will delete all files in a folder if you delete + + + a profile, regardless of whether they are profile files or not. + +
+ +
+
+ - Suggested settings for your Selenium Profile + From “View\Toolbars” tab, uncheck “Bookmarks Toolbar” + Right click from toolbar and click “Customize” + Remove “Google search” by dragging it to the “Customize Toolbar” window + From the “Customize Toolbar” window, click “Use Small Icons” check box then hit “Done” + Click “Edit\Preferences” then set the following: +
+ “Main” tab + - set Home Page to “about:blank” + - uncheck “Show the Downloads..” option +
+
+ “Tabs” tab + - Select “a new window” for new pages + - Uncheck all warning options +
+
+ “Content” tab + - uncheck “Block pop-up” windows option +
+
+ “Privacy” tab + - uncheck all “History” options +
+
+ “Security” tab + - uncheck all “Security” options + - click “Settings” and uncheck all warning options +
+
+ “Advanced” tab + - Uncheck “autoscrolling” option from “General” tab + - uncheck “warn me …” and “Ssearch Engines”option from “Update” tab +
+ + +
+ +
+
+ + + +
+
+ + At the file “seleniumXml.properties”. + Change browser=*firefox + To browser=*firefox /usr/lib/firefox-3.0.8/firefox + (*** firefox path) +
+
+ + At the file “runSeleniumServer.sh” + "$JAVA" -jar ../../framework/testtools/lib/selenium-server.jar + -firefoxProfileTemplate "put path to the profile dir" + -trustAllSSLCertificates -singleWindow -timeout 240 + +
+
+ Note : Please follows the link + + + + + if your found the problem “ofbiz.org cert is expired causes peer not authenticated“. + +
+
\ No newline at end of file diff --git a/framework/testtools/documents/SeleniumHelpData.xml b/framework/testtools/documents/SeleniumHelpData.xml new file mode 100644 index 0000000000..3efa1e43fd --- /dev/null +++ b/framework/testtools/documents/SeleniumHelpData.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + /> + + + + /> + + + + + + \ No newline at end of file diff --git a/framework/testtools/entitydef/entitymodel.xml b/framework/testtools/entitydef/entitymodel.xml new file mode 100644 index 0000000000..9a58d88c8d --- /dev/null +++ b/framework/testtools/entitydef/entitymodel.xml @@ -0,0 +1,42 @@ + + + + + + + + Entity of an Open For Business Project Component + None + Copyright 2001-2009 The Apache Software Foundation + None + 1.0 + + + + + + + + + diff --git a/framework/testtools/ofbiz-component.xml b/framework/testtools/ofbiz-component.xml index 64ddcbd117..3c1830e5db 100644 --- a/framework/testtools/ofbiz-component.xml +++ b/framework/testtools/ofbiz-component.xml @@ -1,37 +1,43 @@ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-component.xsd"> - + - + - + + + + + + - + + \ No newline at end of file diff --git a/framework/testtools/runSeleniumServer.sh b/framework/testtools/runSeleniumServer.sh index 61a8942b7b..50b5bc53b4 100755 --- a/framework/testtools/runSeleniumServer.sh +++ b/framework/testtools/runSeleniumServer.sh @@ -6,6 +6,6 @@ else JAVA=java fi -"$JAVA" -jar ../../framework/testtools/lib/selenium-server.jar -timeout 240 +"$JAVA" -jar ../../framework/testtools/lib/selenium-server.jar -singleWindow -trustAllSSLCertificates -timeout 240 exit 0 diff --git a/framework/testtools/runSeleniumXml.sh b/framework/testtools/runSeleniumXml.sh index 8684b27b70..a0e7adea96 100755 --- a/framework/testtools/runSeleniumXml.sh +++ b/framework/testtools/runSeleniumXml.sh @@ -9,6 +9,7 @@ export CP=$CP:$OFBIZ_HOME/framework/base/lib/scripting/jython-nooro.jar export CP=$CP:$OFBIZ_HOME/framework/base/lib/junit.jar export CP=$CP:$OFBIZ_HOME/framework/base/lib/commons/commons-lang-2.3.jar export CP=$CP:$OFBIZ_HOME/framework/base/lib/log4j-1.2.15.jar +export CP=$CP:$OFBIZ_HOME/framework/base/lib/javolution-5.2.3.jar echo $CP diff --git a/framework/testtools/script/org/ofbiz/selenium/SeleniumTestSuitePathEvents.xml b/framework/testtools/script/org/ofbiz/selenium/SeleniumTestSuitePathEvents.xml new file mode 100644 index 0000000000..32dbcbdfad --- /dev/null +++ b/framework/testtools/script/org/ofbiz/selenium/SeleniumTestSuitePathEvents.xml @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/framework/testtools/src/org/ofbiz/testtools/VerifySeleniumSetups.java b/framework/testtools/src/org/ofbiz/testtools/VerifySeleniumSetups.java new file mode 100644 index 0000000000..11019f6b8c --- /dev/null +++ b/framework/testtools/src/org/ofbiz/testtools/VerifySeleniumSetups.java @@ -0,0 +1,179 @@ +package org.ofbiz.testtools; + +import java.io.BufferedInputStream; +import java.io.BufferedOutputStream; +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.UnsupportedEncodingException; +import java.io.Writer; +import java.net.MalformedURLException; +import java.net.URL; +import java.net.URLConnection; +import java.util.Map; +import java.util.Properties; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.ofbiz.base.util.Debug; +import org.ofbiz.base.util.UtilProperties; +import org.ofbiz.base.util.UtilURL; + + +import javolution.util.FastMap; + + +import net.sf.json.JSONObject; + + +public class VerifySeleniumSetups { + + public static final String module = VerifySeleniumSetups.class.getName(); + private static int currentValue = 0; + private static int contentLength = 0; + private static Map josonMap = null; + private static String urlSite = "http://downloads.sourceforge.net/seleniumxml/selenium-server-1.0-SNAPSHOT-20081126.jar?use_mirror="; + private static String libPath = "framework/testtools/lib/selenium-server.jar"; + + public VerifySeleniumSetups(){ + + } + + /* prepare lib for selenium test + * Check & download selenium-server.jar from http://downloads.sourceforge.net/seleniumxml/selenium-server-1.0-SNAPSHOT-20081126.jar?use_mirror= + * Check a change use HTTP as the default at file framework/webapp/config/url.properties + * Check correct the config/seleniumXml.properties and firefox path + */ + + public static String verifyConfig(HttpServletRequest request, HttpServletResponse response){ + boolean lib = false; + boolean urlset = false; + Map msgMap = FastMap.newInstance(); + Properties urlProps = null; + try{ + /* Check and down load selenium-server.jar */ + File file = new File(libPath); + URL url = new URL(urlSite); + URLConnection connection = url.openConnection(); + contentLength = connection.getContentLength(); + if(contentLength == -1){ + request.setAttribute("_ERROR_MESSAGE_", "can not conect to the internet"); + } + Debug.log("file size. "+contentLength,module); + if(file.exists()){ + if(contentLength == file.length()){ + lib = true; + }else lib = false; + } + msgMap.put("LIBFLAG",lib); + + /* Check a change use HTTP as the default */ + String httpStatus = null; + URL urlProp = UtilURL.fromResource("url.properties"); + if (urlProps == null) { + urlProps = new Properties(); + if (urlProp == null) { + String errMsg = "variable with name " + urlProp.toString() + " is not set, cannot resolve location."; + throw new MalformedURLException(errMsg); + } + urlProps = UtilProperties.getProperties(urlProp); + if(urlProps != null){ + httpStatus = urlProps.getProperty("port.https.enabled"); + if(httpStatus != null && httpStatus.equals("N")){ + urlset = true; + } + } + } + msgMap.put("URLFLAG",urlset); + request.setAttribute("MSGMAP", msgMap); + }catch(Exception e){ + Debug.logError(e.getMessage(), module); + } + return "success"; + } + + public static void doDownload( HttpServletRequest request, HttpServletResponse response){ + URL url = null; + long bytesRead= 0; + currentValue = 0; + contentLength = 0; + BufferedInputStream in = null; + BufferedOutputStream out = null; + try { + url = new URL(urlSite); + + URLConnection connection = url.openConnection(); + contentLength = connection.getContentLength(); + InputStream stream = connection.getInputStream(); + Debug.log("getContentLength is :"+contentLength); + + in = new BufferedInputStream(stream); + + long totalBytes = in.available(); + Debug.log("totalBytes is : "+totalBytes); + + byte[] b = new byte[1024]; + + FileOutputStream file = new FileOutputStream(libPath); + out = new BufferedOutputStream(file); + + int r; + Debug.log("currentValue is : "+currentValue+" bytes"); + while ((r = in.read(b,0,b.length)) != -1) { + out.write(b,0,r); + bytesRead += r; + currentValue = (int)(bytesRead * 100 / contentLength); + // Debug.log("loading.. :"+bytesRead); + } + out.flush(); + } catch (IOException ex) { + Debug.logError("Error message :"+ex.getMessage(),module); + }finally { + try { + if (in != null) in.close(); + if (out != null) out.close(); + }catch (Exception ex) { + Debug.logError("Error message :"+ex.getMessage(),module); + } + } + } + + public static String checkProgressDownloadStatus(HttpServletRequest request, HttpServletResponse response){ + if(josonMap == null){ + josonMap = FastMap.newInstance(); + } + + josonMap.put("loadPercent", currentValue); + josonMap.put("contentLength", contentLength); + toJsonObject(josonMap,response); + + return "success"; + } + + public static void toJsonObject(Map attrMap, HttpServletResponse response){ + JSONObject json = JSONObject.fromObject(attrMap); + String jsonStr = json.toString(); + if (jsonStr == null) { + Debug.logError("JSON Object was empty; fatal error!",module); + } + // set the X-JSON content type + response.setContentType("application/json"); + // jsonStr.length is not reliable for unicode characters + try { + response.setContentLength(jsonStr.getBytes("UTF8").length); + } catch (UnsupportedEncodingException e) { + Debug.logError("Problems with Json encoding",module); + } + // return the JSON String + Writer out; + try { + out = response.getWriter(); + out.write(jsonStr); + out.flush(); + } catch (IOException e) { + Debug.logError("Unable to get response writer",module); + } + } +} diff --git a/framework/testtools/src/org/ofbiz/testtools/seleniumxml/SeleniumXml.java b/framework/testtools/src/org/ofbiz/testtools/seleniumxml/SeleniumXml.java index 12b46e4ee9..e9f1872d78 100644 --- a/framework/testtools/src/org/ofbiz/testtools/seleniumxml/SeleniumXml.java +++ b/framework/testtools/src/org/ofbiz/testtools/seleniumxml/SeleniumXml.java @@ -18,11 +18,17 @@ */ package org.ofbiz.testtools.seleniumxml; +import java.io.BufferedInputStream; +import java.io.BufferedOutputStream; +import java.io.DataInputStream; import java.io.File; import java.io.FileInputStream; +import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.net.MalformedURLException; +import java.net.URL; +import java.net.URLConnection; import java.util.List; import java.util.ArrayList; import java.util.Map; @@ -31,10 +37,12 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; import java.lang.reflect.*; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; import javolution.util.FastMap; - import junit.framework.Assert; +import org.apache.commons.io.output.ByteArrayOutputStream; import org.apache.commons.lang.RandomStringUtils; import org.apache.log4j.Level; import org.apache.log4j.Logger; @@ -43,9 +51,12 @@ import org.jdom.Document; import org.jdom.Element; import org.jdom.JDOMException; import org.jdom.input.SAXBuilder; +import org.ofbiz.testtools.seleniumxml.util.TestUtils; import org.ofbiz.base.util.UtilGenerics; -import org.ofbiz.testtools.seleniumxml.util.TestUtils; +import org.ofbiz.base.util.UtilHttp; +import org.ofbiz.base.util.UtilProperties; +import org.ofbiz.base.util.UtilURL; import com.thoughtworks.selenium.DefaultSelenium; //import com.thoughtworks.selenium.SeleniumException; @@ -53,7 +64,8 @@ import com.thoughtworks.selenium.DefaultSelenium; public class SeleniumXml { - public static final String PROPS_NAME = "selenium.config"; + //public static final String PROPS_NAME = "selenium.config"; + public static String PROPS_NAME = "selenium.config"; Logger logger = Logger.getLogger(SeleniumXml.class.getName()); public static final int MAX_STR_LENGTH = 15; @@ -83,6 +95,35 @@ public class SeleniumXml { sel.runTest(args[0]); } } + + /* call run test suite from webtool selenium */ + public static String runTestSuite(HttpServletRequest request, HttpServletResponse response){ + Map parameters = UtilHttp.getParameterMap(request); + String para = (String)parameters.get("testSuitePath"); + if(para == null){ + System.out.println("Error message : Test suite Path is null"); + return "success"; + } + if(para.length()==0){ + System.out.println("Error message : Test suite Path is null"); + return "success"; + } + try{ + URL url = UtilURL.fromResource("seleniumXml.properties"); + if (props == null) { + props = new Properties(); + initConfig(url); + } + SeleniumXml sel = new SeleniumXml(); + sel.runTest(para.trim()); + }catch(JDOMException jdome){ + System.out.println(jdome.getMessage()); + }catch(IOException ioe){ + System.out.println("Error message : "+ioe.getMessage()); + }finally{ + return "success"; + } + } public SeleniumXml() throws IOException { this.map = FastMap.newInstance(); @@ -95,7 +136,12 @@ public class SeleniumXml { private static void initConfig() throws IOException { try { - String configFile = System.getProperty(PROPS_NAME); + String configFile = ""; + if(System.getProperty(PROPS_NAME)==null){ + configFile = PROPS_NAME; + }else{ + configFile = System.getProperty(PROPS_NAME); + } if (configFile == null) { String errMsg = "The Java environment (-Dxxx=yyy) variable with name " + PROPS_NAME + " is not set, cannot resolve location."; throw new MalformedURLException(errMsg); @@ -111,6 +157,19 @@ public class SeleniumXml { throw e; } } + private static void initConfig(URL url) throws IOException { + try { + if (url == null) { + String errMsg = "The Java environment (-Dxxx=yyy) variable with name " + url.toString() + " is not set, cannot resolve location."; + throw new MalformedURLException(errMsg); + } + // BasicConfigurator.configure(); + props = UtilProperties.getProperties(url); + } catch (IOException e) { + e.printStackTrace(); + throw e; + } + } /** * Constructor to preset with an existing Map of parameters. Intended to be used @@ -136,7 +195,8 @@ public class SeleniumXml { public void runCommands() { Element root = this.doc.getRootElement(); - List nodes = UtilGenerics.cast(root.getChildren()); + //List nodes = UtilGenerics.cast(root.getChildren()); + List nodes = root.getChildren(); runCommands(nodes); } @@ -734,5 +794,4 @@ public class SeleniumXml { public Map getMap() { return this.map; } -} - +} \ No newline at end of file diff --git a/framework/testtools/testdef/seleniumxml/example/example_testsuite.xml b/framework/testtools/testdef/seleniumxml/example/example_testsuite.xml index 338014cd38..ba79626ae2 100644 --- a/framework/testtools/testdef/seleniumxml/example/example_testsuite.xml +++ b/framework/testtools/testdef/seleniumxml/example/example_testsuite.xml @@ -1,8 +1,14 @@ - + + + + + + + diff --git a/framework/testtools/webapp/testtools/SeleniumTest.ftl b/framework/testtools/webapp/testtools/SeleniumTest.ftl new file mode 100644 index 0000000000..a2f0444ed8 --- /dev/null +++ b/framework/testtools/webapp/testtools/SeleniumTest.ftl @@ -0,0 +1,117 @@ +<#-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +<#assign libcheck = ""> +<#assign urlcheck = ""> +<#assign msg = request.getAttribute("MSGMAP")?if_exists> +<#if msg?has_content> + <#if msg.LIBFLAG?exists><#assign libcheck = msg.LIBFLAG?if_exists?string> + <#if msg.URLFLAG?exists><#assign urlcheck = msg.URLFLAG?if_exists?string> + +Verify + + + + + + + + + + + + + + + + + +
DescriptionStatus
- selenium_server.jar + <#if libcheck == "true"> + success + <#else> +
please click download this lib for run the selenium application!
+ + + + +
- Changes ofbiz to use HTTP as the default at file (framework/webapp/config/url.properties) + <#if urlcheck == "true"> + success + <#else> +
Not success!
+ +
+
    +
  1. Edit 'framework/testtools/config/seleniumXml.properties' and add your firefox path, replace the example in the file
  2. +
  3. Then save and restart ofbiz.
  4. +
  5. Then open a new terminal to start the seleniumserver. (cd framework/testtools;./runSeleniumServer.sh)
  6. +
  7. Then run the test below.
  8. +
+
+
+ \ No newline at end of file diff --git a/framework/testtools/webapp/testtools/WEB-INF/controller.xml b/framework/testtools/webapp/testtools/WEB-INF/controller.xml new file mode 100644 index 0000000000..bab94b6e98 --- /dev/null +++ b/framework/testtools/webapp/testtools/WEB-INF/controller.xml @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/framework/testtools/webapp/testtools/WEB-INF/web.xml b/framework/testtools/webapp/testtools/WEB-INF/web.xml new file mode 100644 index 0000000000..e95124d861 --- /dev/null +++ b/framework/testtools/webapp/testtools/WEB-INF/web.xml @@ -0,0 +1,90 @@ + + + + + + Open For Business - Example Application + Example Application of the Open For Business Project + + + webSiteId + TESTTOOLS + A unique ID used to look up the WebSite entity + + + localDispatcherNametesttools + A unique name used to identify/recognize the local dispatcher for the Service Engine + + + entityDelegatorNamedefault + The Name of the Entity Delegator to use, defined in entityengine.xml + + + mainDecoratorLocation + component://example/widget/example/CommonScreens.xml + The location of the main-decorator screen to use for this webapp; referred to as a context variable in screen def XML files. + + + widgetVerbose + false + Enable widget boundary comments. See org.ofbiz.widget.ModelWidget.widgetBoundaryCommentsEnabled(). + + + compressHTML + false + Remove unnecessary whitespace from HTML output. + + + + ContextFilter + ContextFilter + org.ofbiz.webapp.control.ContextFilter + disableContextSecurityN + + allowedPaths + /control:/select:/index.html:/index.jsp:/default.html:/default.jsp:/images:/includes/maincss.css + + errorCode403 + redirectPath/control/main + + ContextFilter/* + + org.ofbiz.webapp.control.ControlEventListener + org.ofbiz.webapp.control.LoginEventListener + + + + + ControlServlet + ControlServlet + Main Control Servlet + org.ofbiz.webapp.control.ControlServlet + 1 + + ControlServlet/control/* + + 60 + + + index.jsp + index.html + index.htm + + diff --git a/framework/testtools/widget/CommonScreens.xml b/framework/testtools/widget/CommonScreens.xml new file mode 100644 index 0000000000..be70203d76 --- /dev/null +++ b/framework/testtools/widget/CommonScreens.xml @@ -0,0 +1,96 @@ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + +
+
+ + +
+ + + + + + + + + + + +
+
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
\ No newline at end of file diff --git a/framework/testtools/widget/Menus.xml b/framework/testtools/widget/Menus.xml new file mode 100644 index 0000000000..d80b018b6f --- /dev/null +++ b/framework/testtools/widget/Menus.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + diff --git a/framework/testtools/widget/RunSeleniumForms.xml b/framework/testtools/widget/RunSeleniumForms.xml new file mode 100644 index 0000000000..d9ce1fbcc3 --- /dev/null +++ b/framework/testtools/widget/RunSeleniumForms.xml @@ -0,0 +1,69 @@ + + + + + +
+ + + + + + + +