Author: vmolotkov
Date: 2008-06-06 06:58:26 -0400 (Fri, 06 Jun 2008)
New Revision: 8929
Added:
trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/bean/Configurator.java
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/SeleniumTestBaseNew.java
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/Templates.java
trunk/test-applications/seleniumTest/src/test/testng/win/testng_all_all_neko.xml
trunk/test-applications/seleniumTest/src/test/testng/win/testng_all_all_none.xml
trunk/test-applications/seleniumTest/src/test/testng/win/testng_all_all_tidy.xml
trunk/test-applications/seleniumTest/src/test/testng/win/testng_all_default_neko.xml
trunk/test-applications/seleniumTest/src/test/testng/win/testng_all_default_none.xml
trunk/test-applications/seleniumTest/src/test/testng/win/testng_all_default_tidy.xml
trunk/test-applications/seleniumTest/src/test/testng/win/testng_default_all_neko.xml
trunk/test-applications/seleniumTest/src/test/testng/win/testng_default_all_none.xml
trunk/test-applications/seleniumTest/src/test/testng/win/testng_default_all_tidy.xml
trunk/test-applications/seleniumTest/src/test/testng/win/testng_default_default_neko.xml
trunk/test-applications/seleniumTest/src/test/testng/win/testng_default_default_none.xml
trunk/test-applications/seleniumTest/src/test/testng/win/testng_default_default_tidy.xml
Removed:
trunk/test-applications/seleniumTest/src/test/testng/win/testng.xml
Modified:
trunk/test-applications/seleniumTest/pom.xml
trunk/test-applications/seleniumTest/src/main/webapp/WEB-INF/faces-config.xml
trunk/test-applications/seleniumTest/src/main/webapp/WEB-INF/web.xml
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/AjaxCommandButtonTest.java
Log:
selenium tests functionality
Modified: trunk/test-applications/seleniumTest/pom.xml
===================================================================
--- trunk/test-applications/seleniumTest/pom.xml 2008-06-06 10:14:53 UTC (rev 8928)
+++ trunk/test-applications/seleniumTest/pom.xml 2008-06-06 10:58:26 UTC (rev 8929)
@@ -74,8 +74,9 @@
</cargo.servlet.port>
</properties>
</configuration>
- </configuration>
- <executions>
+ </configuration>
+ <executions>
+ <!--
<execution>
<id>start-container</id>
<phase>pre-integration-test</phase>
@@ -89,7 +90,8 @@
<goals>
<goal>stop</goal>
</goals>
- </execution>
+ </execution>
+ -->
</executions>
</plugin>
<plugin>
@@ -113,8 +115,41 @@
<configuration>
<skip>false</skip>
<suiteXmlFiles>
- <suiteXmlFile>
- ${project.build.directory}/test-classes/testng/testng.xml
+ <suiteXmlFile>
+ ${project.build.directory}/test-classes/testng/testng_all_all_none.xml
+ </suiteXmlFile>
+ <suiteXmlFile>
+ ${project.build.directory}/test-classes/testng/testng_all_all_tidy.xml
+ </suiteXmlFile>
+ <suiteXmlFile>
+ ${project.build.directory}/test-classes/testng/testng_all_all_neko.xml
+ </suiteXmlFile>
+ <suiteXmlFile>
+ ${project.build.directory}/test-classes/testng/testng_all_default_none.xml
+ </suiteXmlFile>
+ <suiteXmlFile>
+ ${project.build.directory}/test-classes/testng/testng_all_default_none.xml
+ </suiteXmlFile>
+ <suiteXmlFile>
+ ${project.build.directory}/test-classes/testng/testng_all_default_none.xml
+ </suiteXmlFile>
+ <suiteXmlFile>
+ ${project.build.directory}/test-classes/testng/testng_default_all_none.xml
+ </suiteXmlFile>
+ <suiteXmlFile>
+ ${project.build.directory}/test-classes/testng/testng_default_all_none.xml
+ </suiteXmlFile>
+ <suiteXmlFile>
+ ${project.build.directory}/test-classes/testng/testng_default_all_none.xml
+ </suiteXmlFile>
+ <suiteXmlFile>
+ ${project.build.directory}/test-classes/testng/testng_default_default_none.xml
+ </suiteXmlFile>
+ <suiteXmlFile>
+ ${project.build.directory}/test-classes/testng/testng_default_default_none.xml
+ </suiteXmlFile>
+ <suiteXmlFile>
+ ${project.build.directory}/test-classes/testng/testng_default_default_none.xml
</suiteXmlFile>
</suiteXmlFiles>
</configuration>
@@ -144,7 +179,8 @@
<goals>
<goal>xvfb</goal>
</goals>
- </execution>
+ </execution>
+
<execution>
<phase>pre-integration-test</phase>
<goals>
@@ -180,7 +216,8 @@
<groupId>org.codehaus.mojo</groupId>
<artifactId>selenium-maven-plugin</artifactId>
<version>1.0-beta-2</version>
- <executions>
+ <executions>
+ <!--
<execution>
<phase>pre-integration-test</phase>
<goals>
@@ -190,7 +227,8 @@
<background>true</background>
<debug>false</debug>
</configuration>
- </execution>
+ </execution>
+ -->
</executions>
</plugin>
</plugins>
Added:
trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/bean/Configurator.java
===================================================================
---
trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/bean/Configurator.java
(rev 0)
+++
trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/bean/Configurator.java 2008-06-06
10:58:26 UTC (rev 8929)
@@ -0,0 +1,51 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+package org.ajax4jsf.bean;
+
+public class Configurator {
+
+ private static final String[] LOAD_STRATEGIES = new String[] {"DEFAULT",
"ALL"};
+
+ private static String loadScriptStrategy = LOAD_STRATEGIES[0];
+
+ private static String loadStyleStrategy = LOAD_STRATEGIES[0];
+
+ private static int currentStrategyIndex = 0;
+
+ public Configurator() {}
+
+ public String getLoadScriptStrategy() {
+ return loadScriptStrategy;
+ }
+
+ public static void setLoadScriptStrategy(String strategy) {
+ loadScriptStrategy = strategy;
+ }
+
+ public String getLoadStyleStrategy() {
+ return loadStyleStrategy;
+ }
+
+ public static void setLoadStyleStrategy(String strategy) {
+ loadStyleStrategy = strategy;
+ }
+
+}
Modified: trunk/test-applications/seleniumTest/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
---
trunk/test-applications/seleniumTest/src/main/webapp/WEB-INF/faces-config.xml 2008-06-06
10:14:53 UTC (rev 8928)
+++
trunk/test-applications/seleniumTest/src/main/webapp/WEB-INF/faces-config.xml 2008-06-06
10:58:26 UTC (rev 8929)
@@ -10,6 +10,12 @@
</application>
<managed-bean>
+ <managed-bean-name>configurator</managed-bean-name>
+ <managed-bean-class>org.ajax4jsf.bean.Configurator</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+
+ <managed-bean>
<managed-bean-name>indexBean</managed-bean-name>
<managed-bean-class>org.ajax4jsf.bean.IndexBean</managed-bean-class>
<managed-bean-scope>application</managed-bean-scope>
Modified: trunk/test-applications/seleniumTest/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/test-applications/seleniumTest/src/main/webapp/WEB-INF/web.xml 2008-06-06
10:14:53 UTC (rev 8928)
+++ trunk/test-applications/seleniumTest/src/main/webapp/WEB-INF/web.xml 2008-06-06
10:58:26 UTC (rev 8929)
@@ -37,22 +37,28 @@
<param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
<param-value>false</param-value>
</context-param>
- <!-- context-param>
+ <context-param>
<param-name>org.ajax4jsf.xmlparser.ORDER</param-name>
<param-value>NONE,TIDY,NEKO</param-value>
</context-param>
<context-param>
<param-name>org.ajax4jsf.xmlparser.TIDY</param-name>
<param-value>
- /pages/*
+ /faces/TIDY/*
</param-value>
</context-param>
- <context-param>
- <param-name>org.ajax4jsf.xmlparser.NONE</param-name>
- <param-value>
- /pages/layout.xhtml
- </param-value>
- </context-param-->
+ <context-param>
+ <param-name>org.ajax4jsf.xmlparser.NEKO</param-name>
+ <param-value>
+ /faces/NEKO/*
+ </param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.ajax4jsf.xmlparser.NONE</param-name>
+ <param-value>
+ /faces/NONE/*
+ </param-value>
+ </context-param>
<!--
<context-param>
<param-name>org.ajax4jsf.SKIN</param-name>
@@ -61,11 +67,11 @@
-->
<context-param>
<param-name>org.richfaces.LoadStyleStrategy</param-name>
- <param-value>DEFAULT</param-value>
+ <param-value>#{configurator.loadStyleStrategy}</param-value>
</context-param>
<context-param>
<param-name>org.richfaces.LoadScriptStrategy</param-name>
- <param-value>DEFAULT</param-value>
+ <param-value>#{configurator.loadScriptStrategy}</param-value>
</context-param>
<!--
-->
@@ -91,10 +97,12 @@
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
- <servlet-mapping>
- <servlet-name>Faces Servlet</servlet-name>
- <url-pattern>/faces/*</url-pattern>
- </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>/faces/NEKO/*</url-pattern>
+ <url-pattern>/faces/TIDY/*</url-pattern>
+ <url-pattern>/faces/NONE/*</url-pattern>
+ </servlet-mapping>
<error-page>
<exception-type>javax.servlet.ServletException</exception-type>
<location>/faces/error.xhtml</location>
Added:
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/SeleniumTestBaseNew.java
===================================================================
---
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/SeleniumTestBaseNew.java
(rev 0)
+++
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/SeleniumTestBaseNew.java 2008-06-06
10:58:26 UTC (rev 8929)
@@ -0,0 +1,695 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces;
+
+import org.ajax4jsf.bean.Configurator;
+import org.ajax4jsf.javascript.ScriptUtils;
+import org.openqa.selenium.server.SeleniumServer;
+import org.testng.Assert;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.AfterSuite;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.BeforeSuite;
+import org.testng.annotations.Parameters;
+
+import com.thoughtworks.selenium.DefaultSelenium;
+
+/**
+ * The base java class for selenium tests implementation.
+ *
+ * @author Andrey Markavtsov
+ *
+ */
+public abstract class SeleniumTestBaseNew {
+
+ /** Specifies the time to wait for page rendering */
+ private static final Integer pageRenderTime = 5000;
+
+ /** Specifies the time to wait for ajax processing */
+ protected static final int ajaxCompletionTime = 3000;
+
+ protected static final String serverPort = "8085";
+
+ private static final String WINDOW_JS_RESOLVER =
"selenium.browserbot.getCurrentWindow().";
+
+ private static String filterPrefix;
+
+ private static String hostUrl;
+
+ private static String testUrl;
+
+ /** Parent component id */
+ private String parentId;
+
+ /** The default selenium instance */
+ public static DefaultSelenium selenium;
+
+ /** Host */
+ public static String host;
+
+ /** Port */
+ public static String port;
+
+ /** Protocol */
+ public static String protocol;
+
+ /** Defines the name of current j2ee application name */
+ public static final String APPLICATION_NAME = "seleniumTest";
+
+ public static final String DATA_TABLE_TEMPLATE = "dataTable";
+
+ public static final String MODAL_PANEL_TEMPLATE = "modalPanel";
+
+ public static final String SIMPLE_TEMPLATE = "simple";
+
+ public static SeleniumServer seleniumServer;
+
+ public SeleniumTestBaseNew(String protocol, String host, String port) {
+ this.host = host;
+ this.port = port;
+ this.protocol = protocol;
+ }
+
+
+ @BeforeSuite
+ public void startSeleniumServer() throws Exception {
+ seleniumServer = new SeleniumServer();
+ seleniumServer.start();
+ }
+
+
+ @AfterSuite
+ public void stopSeleniumServer() throws Exception {
+ seleniumServer.stop();
+ }
+
+ /**
+ * @param url
+ * @param browser
+ * @return
+ */
+ private DefaultSelenium createSeleniumClient(String url, String browser) {
+ return new DefaultSelenium(host, 4444, browser, url);
+ }
+
+ /**
+ * This method are invoking before selenium tests started
+ */
+ protected void startSelenium(String browser, String filter) {
+ filterPrefix = filter;
+ if (hostUrl == null) {
+ hostUrl = buildHostUrl();
+ }
+ selenium = createSeleniumClient(buildHostUrl(), browser);
+ selenium.start();
+ }
+
+
+ protected void loadConfiguration(String loadStyleStrategy, String loadScriptStrategy)
throws Exception {
+ Configurator.setLoadScriptStrategy(loadScriptStrategy);
+ Configurator.setLoadStyleStrategy(loadStyleStrategy);
+ }
+
+ private String buildHostUrl() {
+ StringBuilder url = new StringBuilder();
+ url.append(protocol).append("://").append(host)
+ .append(":").append(port).append("/");
+ return url.toString();
+ }
+
+ private String buildTestUrl() {
+ StringBuilder testUrl = new StringBuilder();
+ testUrl.append(APPLICATION_NAME).append(filterPrefix);
+ return testUrl.toString();
+ }
+
+ private String getTestUrl() {
+ if (testUrl == null) {
+ testUrl = buildTestUrl();
+ }
+ return testUrl;
+ }
+
+ /**
+ * Renders page
+ */
+ @Deprecated
+ protected void renderPage(String homePage) {
+ selenium.open(getTestUrl() + homePage);
+ selenium.waitForPageToLoad(String.valueOf(pageRenderTime));
+
+ checkPageRendering(); // At the first we check if page has been
+ // rendered
+ checkJSError(); // At the second we check if JS errors occurred
+
+ // reRenderForm(); // ReRender component
+
+ // checkPageRendering(); // Check all again
+ // checkJSError();
+
+ }
+
+ /**
+ * Renders page
+ */
+ @Deprecated
+ protected void renderPage(String homePage, Templates template) {
+ selenium.open(getTestUrl() + homePage);
+ selenium.waitForPageToLoad(String.valueOf(pageRenderTime));
+
+ template.loadTemplate(this);
+
+ checkPageRendering(); // At the first we check if page has been
+ // rendered
+ checkJSError(); // At the second we check if JS errors occurred
+
+ reRenderForm(); // ReRender component
+
+ checkPageRendering(); // Check all again
+ checkJSError();
+
+ }
+
+ /**
+ * Renders page
+ */
+ protected void renderPage(Templates template) {
+ selenium.open(getTestUrl() + getTestPrefix());
+ selenium.waitForPageToLoad(String.valueOf(pageRenderTime));
+
+ template.loadTemplate(this);
+
+ checkPageRendering(); // At the first we check if page has been
+ // rendered
+ checkJSError(); // At the second we check if JS errors occurred
+
+ reRenderForm(); // ReRender component
+
+ checkPageRendering(); // Check all again
+ checkJSError();
+
+ }
+
+
+ /**
+ * Writes status message on client side
+ *
+ * @param message
+ */
+ public void writeStatus(String message) {
+ message = message.replace("'", "\\'");
+ StringBuffer buffer = new StringBuffer("writeStatus('");
+ buffer.append(message);
+ buffer.append("')");
+ runScript(buffer.toString());
+ }
+
+ /**
+ * ReRenders the component
+ */
+ public void reRenderForm() {
+
selenium.getEval("selenium.browserbot.getCurrentWindow().reRenderAll();");
+ // clickById("_Selenium_Test_ReRender_Form:_reRender");
+ waitForAjaxCompletion(3000);
+ }
+
+ /**
+ * Performs script defined in parameter
+ *
+ * @param script
+ * @return
+ */
+ public String runScript(String script) {
+ String result = selenium.getEval(WINDOW_JS_RESOLVER + script);
+ checkJSError();
+ return result;
+ }
+
+ /**
+ * Performs script defined in parameter
+ *
+ * @param script
+ * @return
+ */
+ public String runScript(String script, boolean checkEerror) {
+ String result = selenium.getEval(WINDOW_JS_RESOLVER + script);
+ if (checkEerror) {
+ checkJSError();
+ }
+ return result;
+ }
+
+ /**
+ * This method are invoking after selenium tests completed
+ */
+ protected void stopSelenium() {
+ selenium.stop();
+ selenium = null;
+ }
+
+ /**
+ * Checks if JS error occurred. Fails test if yes. This method should be
+ * invoked after each event or any thing which can be a cause of JS error.
+ */
+ public void checkJSError() {
+ String error = selenium.getEval(WINDOW_JS_RESOLVER + "checkError();");
+ if (error != null && !("null".equals(error)) &&
!("".equals(error))) {
+ Assert.fail("Failure by the following Javascript error: " +
error);
+ }
+ }
+
+ /**
+ * Checks if page containing component test has been rendered completely
+ */
+ public void checkPageRendering() {
+ try {
+ String t1 = getTextById("_Selenium_Test_ControlPoint1");
+ String t2 = getTextById("_Selenium_Test_ControlPoint2");
+ if (t1 == null || t2 == null || !"Control1".equals(t1) ||
!"Control2".equals(t2)) {
+ Assert.fail("The page has been not rendered properlly");
+ }
+ } catch (Exception e) {
+ Assert.fail("The page has not been rendered properly due the following
error: " + e);
+ }
+ }
+
+ /**
+ * Waits while AJAX request will be completed
+ *
+ * @param miliseconds -
+ * time to wait
+ */
+ public void waitForAjaxCompletion(int miliseconds) {
+ selenium.waitForCondition(WINDOW_JS_RESOLVER + "done==true",
String.valueOf(miliseconds));
+ runScript("window.done=false");
+ }
+
+ /**
+ * Waits while AJAX request will be completed
+ *
+ * @param miliseconds -
+ * time to wait
+ */
+ public void waitForAjaxCompletion() {
+ waitForAjaxCompletion(ajaxCompletionTime);
+ }
+
+ /**
+ * Waits while simple request will be completed
+ *
+ * @param miliseconds -
+ * time to wait
+ */
+ public void waitForPageToLoad(int miliseconds) {
+ selenium.waitForPageToLoad(String.valueOf(miliseconds));
+ }
+
+ /**
+ * Waits for condition
+ *
+ * @param condition
+ * @param miliseconds
+ */
+ public void waiteForCondition(String condition, int miliseconds) {
+ selenium.waitForCondition(WINDOW_JS_RESOLVER + condition,
String.valueOf(miliseconds));
+ checkJSError();
+ }
+
+ /**
+ * Waits while simple request will be completed
+ *
+ */
+ public void waitForPageToLoad() {
+ selenium.waitForPageToLoad(String.valueOf(pageRenderTime));
+ }
+
+ /**
+ * Asserts DOM node value equals to value defined
+ *
+ * @param id -
+ * DOM element id
+ * @param value -
+ * value defined
+ */
+ public void AssertValueEquals(String id, String value) {
+ String _v = getValueById(id);
+ Assert.assertEquals(_v, value);
+ }
+
+ /**
+ * Asserts DOM node value equals to value defined
+ *
+ * @param id -
+ * DOM element id
+ * @param value -
+ * value defined
+ * @param message = message to be displayed in failure case
+ */
+ public void AssertValueEquals(String id, String value, String message) {
+ String _v = getValueById(id);
+ Assert.assertEquals(_v, value, message);
+ }
+
+ /**
+ * Asserts DOM node value does not equal to value defined
+ *
+ * @param id -
+ * DOM element id
+ * @param value -
+ * value defined
+ */
+ public void AssertValueNotEquals(String id, String value) {
+ String _v = getValueById(id);
+ Assert.assertNotSame(_v, value);
+ }
+
+
+ /**
+ * Asserts DOM node value does not equal to value defined
+ *
+ * @param id -
+ * DOM element id
+ * @param value -
+ * value defined
+ * @param message = message to be displayed in failure case
+ */
+ public void AssertValueNotEquals(String id, String value, String message) {
+ String _v = getValueById(id);
+ Assert.assertNotSame(_v, value, message);
+ }
+
+
+ /**
+ * Asserts DOM node text equals to text defined
+ *
+ * @param id -
+ * DOM element id
+ * @param value -
+ * text defined
+ */
+ public void AssertTextEquals(String id, String value) {
+ String _v = getTextById(id);
+ Assert.assertEquals(_v, value);
+ }
+
+ /**
+ * Asserts DOM node text equals to text defined
+ *
+ * @param id -
+ * DOM element id
+ * @param value -
+ * text defined
+ * @param message = message to be displayed in failure case
+ */
+ public void AssertTextEquals(String id, String value, String message) {
+ String _v = getTextById(id);
+ Assert.assertEquals(_v, value, message);
+ }
+
+
+ /**
+ * Asserts DOM node text does not equal to text defined
+ *
+ * @param id -
+ * DOM element id
+ * @param value -
+ * text defined
+ */
+ public void AssertTextNotEquals(String id, String value) {
+ String _v = getTextById(id);
+ Assert.assertNotSame(_v, value);
+ }
+
+ /**
+ * Asserts DOM node text does not equal to text defined
+ *
+ * @param id -
+ * DOM element id
+ * @param value -
+ * text defined
+ * @param message = message to be displayed in failure case
+ */
+ public void AssertTextNotEquals(String id, String value, String message) {
+ String _v = getTextById(id);
+ Assert.assertNotSame(_v, value, message);
+ }
+
+ /**
+ * Asserts DOM node is visible
+ *
+ * @param id -
+ * DOM element id
+ */
+ public void AssertVisible(String id) {
+ Assert.assertTrue(isVisibleById(id));
+ }
+
+ /**
+ * Asserts DOM node is not present
+ *
+ * @param id -
+ * DOM element id
+ */
+ public void AssertNotPresent(String id) {
+ Assert.assertFalse(isPresentById(id));
+ }
+
+ /**
+ * Asserts DOM node is not visible
+ *
+ * @param id -
+ * DOM element id
+ */
+ public void AssertNotVisible(String id) {
+ Assert.assertFalse(isVisibleById(id));
+ }
+
+ /**
+ * Returns element's text
+ *
+ * @param id -
+ * DOM element id
+ * @return
+ */
+ public String getTextById(String id) {
+ return selenium.getText("id=" + id);
+ }
+
+ /**
+ * Returns element's value
+ *
+ * @param id -
+ * DOM element id
+ * @return
+ */
+ public String getValueById(String id) {
+ return selenium.getValue("id=" + id);
+ }
+
+ /**
+ * Sets a new value for DOM node with specified id.
+ *
+ * @param id -
+ * DOM element id
+ * @param value -
+ * a new DOM element's value
+ */
+ public void setValueById(String id, String value) {
+
runScript(String.format("document.getElementById('%1$s').value='%2$s';",
id, value));
+ }
+
+ /**
+ * Returns element's width
+ *
+ * @param id -
+ * DOM element id
+ * @return
+ */
+ public Number getWidthById(String id) {
+ return selenium.getElementWidth("id=" + id);
+ }
+
+ /**
+ * Returns element's height
+ *
+ * @param id -
+ * DOM element id
+ * @return
+ */
+ public Number getHeightById(String id) {
+ return selenium.getElementHeight("id=" + id);
+ }
+
+ /**
+ * Clicks on element
+ *
+ * @param id -
+ * DOM element id
+ * @return
+ */
+ public void clickById(String id) {
+ selenium.click("id=" + id);
+ checkJSError();
+ }
+
+ /**
+ * This method should be used for click on command controls instead of
+ * 'clickById' method.
+ *
+ * @param commandId
+ */
+ public void clickCommandAndWait(String commandId) {
+ selenium.click("id=" + commandId);
+ waitForPageToLoad();
+ }
+
+ /**
+ * Return true if element is visible
+ *
+ * @param id -
+ * DOM element id
+ * @return
+ */
+ public boolean isVisibleById(String id) {
+ return selenium.isVisible("id=" + id);
+ }
+
+ /**
+ * Returns true if element with given id is present.
+ *
+ * @param id -
+ * DOM element id
+ * @return true if element with given id is present, otherwise - false
+ */
+ public boolean isPresentById(String id) {
+ return selenium.isElementPresent("id=" + id);
+ }
+
+ /**
+ * Invokes JS method on client.
+ *
+ * @param id -
+ * DOM id of component
+ * @param method -
+ * string method name
+ * @param parameters -
+ * parameters
+ * @return
+ */
+ public String invokeFromComponent(String id, String method, Object parameters) {
+ String _return = null;
+ StringBuffer buffer = new StringBuffer();
+ buffer.append("$('");
+ buffer.append(id);
+ buffer.append("').component.");
+ buffer.append(method);
+ buffer.append("(");
+ buffer.append(ScriptUtils.toScript(parameters));
+ buffer.append(");");
+ _return = runScript(buffer.toString());
+ return _return;
+ }
+
+ /**
+ * Creates delay
+ *
+ * @param miliSeconds
+ * @throws InterruptedException
+ */
+ public void delay(int miliSeconds) {
+ try {
+ Thread.sleep(miliSeconds);
+ } catch (Exception e) {
+
+ }
+ }
+
+ /**
+ * Creates pause for defined time in miliSeconds
+ *
+ * @param miliSeconds
+ */
+ public void pause(int miliSeconds, String id) {
+ StringBuffer script = new StringBuffer("pause(");
+ script.append(miliSeconds);
+ script.append(",'");
+ script.append(id);
+ script.append("');");
+ runScript(script.toString());
+ selenium.waitForCondition(WINDOW_JS_RESOLVER + "pauseHolder['" + id
+ "'] == true;", String
+ .valueOf(miliSeconds + 1000));
+ }
+
+ /**
+ * @return the parentId
+ */
+ public String getParentId() {
+ return parentId;
+ }
+
+ /**
+ * @param parentId
+ * the parentId to set
+ */
+ public void setParentId(String parentId) {
+ this.parentId = parentId;
+ }
+
+ /**
+ * Workaround for selenium.type/selenium.typeKeys
+ * @param locator
+ * @param string
+ */
+ public void type(String locator, String string) {
+ selenium.type(locator, "");
+ StringBuffer value = new StringBuffer(selenium.getValue(locator));
+ char[] chars = string.toCharArray();
+ for (int i = 0; i < chars.length; i++) {
+ String key = Character.toString(chars[i]);
+ value.append(key);
+
+ selenium.keyDown(locator, key);
+
+ if(!isFF()) {
+ selenium.type(locator, value.toString());
+ }
+
+ selenium.keyPress(locator, key);
+ selenium.keyUp(locator, key);
+
+ }
+ }
+
+
+ /**
+ * Returns the url to test page to be opened by selenium
+ * @return
+ */
+ protected String getTestPrefix() {
+ return null;
+ }
+
+ public boolean isFF() {
+ return new
Boolean(selenium.getEval("navigator.userAgent.indexOf('Firefox') >
-1"));
+ }
+
+}
Added: trunk/test-applications/seleniumTest/src/test/java/org/richfaces/Templates.java
===================================================================
--- trunk/test-applications/seleniumTest/src/test/java/org/richfaces/Templates.java
(rev 0)
+++
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/Templates.java 2008-06-06
10:58:26 UTC (rev 8929)
@@ -0,0 +1,62 @@
+package org.richfaces;
+
+import org.ajax4jsf.template.Template;
+
+
+
+public class Templates implements Template {
+
+ private String template = null;
+
+ public Templates(String name) {
+ template = name;
+ }
+
+ public static Templates SIMPLE = new Templates("simple");
+
+ public static Templates DATATABLE = new Templates("dataTable");
+
+ public static Templates MODALPANEL = new Templates("modalPanel");
+
+ private void setParentId(SeleniumTestBase test) {
+ if ("dataTable".equals(template)) {
+ test.setParentId(COMPONENT_PREFIX_INSIDE_TABLE);
+ } else {
+ test.setParentId(COMPONENT_PREFIX_SIMPLE);
+ }
+ }
+
+ private void setParentId(SeleniumTestBaseNew test) {
+ if ("dataTable".equals(template)) {
+ test.setParentId(COMPONENT_PREFIX_INSIDE_TABLE);
+ } else {
+ test.setParentId(COMPONENT_PREFIX_SIMPLE);
+ }
+ }
+
+ public void loadTemplate(SeleniumTestBase test) {
+ setParentId(test);
+ test.runScript("loadTemplate('" + template + "');",
false);
+ test.waitForPageToLoad();
+ }
+
+ public void loadTemplate(SeleniumTestBaseNew test) {
+ setParentId(test);
+ test.runScript("loadTemplate('" + template + "');",
false);
+ test.waitForPageToLoad();
+ }
+
+ public boolean equals(Object obj) {
+ if (obj == null || !(obj instanceof Templates)) {
+ return false;
+ }
+ Templates template = (Templates) obj;
+ if (template.template.equals(this.template)) {
+ return true;
+ }
+ return false;
+ }
+
+
+
+}
Modified:
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/AjaxCommandButtonTest.java
===================================================================
---
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/AjaxCommandButtonTest.java 2008-06-06
10:14:53 UTC (rev 8928)
+++
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/AjaxCommandButtonTest.java 2008-06-06
10:58:26 UTC (rev 8929)
@@ -1,17 +1,23 @@
package org.richfaces.testng;
-import org.ajax4jsf.template.Template;
-import org.richfaces.RichSeleniumTest;
+import org.openqa.selenium.server.SeleniumServer;
import org.richfaces.SeleniumTestBase;
+import org.richfaces.SeleniumTestBaseNew;
+import org.richfaces.Templates;
import org.testng.Assert;
+import org.testng.annotations.AfterGroups;
+import org.testng.annotations.AfterSuite;
import org.testng.annotations.AfterTest;
+import org.testng.annotations.BeforeGroups;
+import org.testng.annotations.BeforeSuite;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;
-public class AjaxCommandButtonTest extends SeleniumTestBase implements RichSeleniumTest
{
+public class AjaxCommandButtonTest extends SeleniumTestBaseNew {
+
public AjaxCommandButtonTest() {
super("http", "localhost", serverPort);
}
@@ -20,11 +26,18 @@
* This method are invoking before selenium tests started
*/
@BeforeTest
- @Parameters( { "browser" })
- public void startSelenium(String browser) {
- super.startSelenium(browser);
+ @Parameters({"browser", "filterPrefix"})
+ public void startSelenium(String browser, String filterPrefix) {
+ super.startSelenium(browser, filterPrefix);
}
+
+ @BeforeTest
+ @Parameters({"loadStyleStrategy", "loadScriptStrategy"})
+ protected void loadConfiguration(String loadStyleStrategy, String loadScriptStrategy)
throws Exception {
+ super.loadConfiguration(loadStyleStrategy, loadScriptStrategy);
+ }
+
/**
* This method are invoking after selenium tests completed
*/
@@ -35,12 +48,12 @@
@Test
public void testAjaxCommandButtonComponent() throws Exception {
- _testAjaxCommandButtonComponent(Template.SIMPLE);
- _testAjaxCommandButtonComponent(Template.DATA_TABLE);
- _testAjaxCommandButtonComponent(Template.MODAL_PANEL);
+ _testAjaxCommandButtonComponent(Templates.SIMPLE);
+ _testAjaxCommandButtonComponent(Templates.DATATABLE);
+ _testAjaxCommandButtonComponent(Templates.MODALPANEL);
}
- private void _testAjaxCommandButtonComponent(Template template) {
+ private void _testAjaxCommandButtonComponent(Templates template) {
renderPage(template);
String parentId = getParentId() + "_form:";
@@ -84,6 +97,8 @@
waitForAjaxCompletion();
waitForOnCompleteHndler();
checkButton(buttonId, true, ajaxSingle, immediate, true, true, true, false);
+
+
}
private void setValidation(boolean success) {
@@ -120,8 +135,8 @@
}
- public String getTestUrl() {
- return "/faces/pages/ajaxCommandButton/ajaxButtonTest.xhtml";
- }
+ public String getTestPrefix() {
+ return "pages/ajaxCommandButton/ajaxButtonTest.xhtml";
+ }
}
Deleted: trunk/test-applications/seleniumTest/src/test/testng/win/testng.xml
===================================================================
--- trunk/test-applications/seleniumTest/src/test/testng/win/testng.xml 2008-06-06
10:14:53 UTC (rev 8928)
+++ trunk/test-applications/seleniumTest/src/test/testng/win/testng.xml 2008-06-06
10:58:26 UTC (rev 8929)
@@ -1,17 +0,0 @@
-<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
-<suite name="seleniumTest">
- <test name="IEFunctionalTests">
- <parameter name="browser" value="*iexplore"/>
- <packages>
- <package name="org.richfaces.testng" />
- </packages>
-
- </test>
- <test name="FireFoxFunctionalTests">
- <parameter name="browser" value="*firefox"/>
- <packages>
- <package name="org.richfaces.testng" />
- </packages>
- </test>
-</suite>
-
Added: trunk/test-applications/seleniumTest/src/test/testng/win/testng_all_all_neko.xml
===================================================================
--- trunk/test-applications/seleniumTest/src/test/testng/win/testng_all_all_neko.xml
(rev 0)
+++
trunk/test-applications/seleniumTest/src/test/testng/win/testng_all_all_neko.xml 2008-06-06
10:58:26 UTC (rev 8929)
@@ -0,0 +1,21 @@
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
+<suite name="seleniumTestAANe">
+ <test name="IEFunctionalTests">
+ <parameter name="browser" value="*iexplore"/>
+ <parameter name="loadStyleStrategy" value="ALL"/>
+ <parameter name="loadScriptStrategy" value="ALL"/>
+ <parameter name="filterPrefix" value="/faces/NEKO/"/>
+ <packages>
+ <package name="org.richfaces.testng" />
+ </packages>
+ </test>
+ <test name="FireFoxFunctionalTestsAANe">
+ <parameter name="loadStyleStrategy" value="ALL"/>
+ <parameter name="loadScriptStrategy" value="ALL"/>
+ <parameter name="filterPrefix" value="/faces/NEKO/"/>
+ <parameter name="browser" value="*firefox"/>
+ <packages>
+ <package name="org.richfaces.testng" />
+ </packages>
+ </test>
+</suite>
Added: trunk/test-applications/seleniumTest/src/test/testng/win/testng_all_all_none.xml
===================================================================
--- trunk/test-applications/seleniumTest/src/test/testng/win/testng_all_all_none.xml
(rev 0)
+++
trunk/test-applications/seleniumTest/src/test/testng/win/testng_all_all_none.xml 2008-06-06
10:58:26 UTC (rev 8929)
@@ -0,0 +1,21 @@
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
+<suite name="seleniumTestAANo">
+ <test name="IEFunctionalTests">
+ <parameter name="browser" value="*iexplore"/>
+ <parameter name="loadStyleStrategy" value="ALL"/>
+ <parameter name="loadScriptStrategy" value="ALL"/>
+ <parameter name="filterPrefix" value="/faces/NONE/"/>
+ <packages>
+ <package name="org.richfaces.testng" />
+ </packages>
+ </test>
+ <test name="FireFoxFunctionalTestsAANo">
+ <parameter name="loadStyleStrategy" value="ALL"/>
+ <parameter name="loadScriptStrategy" value="ALL"/>
+ <parameter name="filterPrefix" value="/faces/NONE/"/>
+ <parameter name="browser" value="*firefox"/>
+ <packages>
+ <package name="org.richfaces.testng" />
+ </packages>
+ </test>
+</suite>
Added: trunk/test-applications/seleniumTest/src/test/testng/win/testng_all_all_tidy.xml
===================================================================
--- trunk/test-applications/seleniumTest/src/test/testng/win/testng_all_all_tidy.xml
(rev 0)
+++
trunk/test-applications/seleniumTest/src/test/testng/win/testng_all_all_tidy.xml 2008-06-06
10:58:26 UTC (rev 8929)
@@ -0,0 +1,21 @@
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
+<suite name="seleniumTestAAT">
+ <test name="IEFunctionalTests">
+ <parameter name="browser" value="*iexplore"/>
+ <parameter name="loadStyleStrategy" value="ALL"/>
+ <parameter name="loadScriptStrategy" value="ALL"/>
+ <parameter name="filterPrefix" value="/faces/TIDY/"/>
+ <packages>
+ <package name="org.richfaces.testng" />
+ </packages>
+ </test>
+ <test name="FireFoxFunctionalTestsAAT">
+ <parameter name="loadStyleStrategy" value="ALL"/>
+ <parameter name="loadScriptStrategy" value="ALL"/>
+ <parameter name="filterPrefix" value="/faces/TIDY/"/>
+ <parameter name="browser" value="*firefox"/>
+ <packages>
+ <package name="org.richfaces.testng" />
+ </packages>
+ </test>
+</suite>
Added:
trunk/test-applications/seleniumTest/src/test/testng/win/testng_all_default_neko.xml
===================================================================
--- trunk/test-applications/seleniumTest/src/test/testng/win/testng_all_default_neko.xml
(rev 0)
+++
trunk/test-applications/seleniumTest/src/test/testng/win/testng_all_default_neko.xml 2008-06-06
10:58:26 UTC (rev 8929)
@@ -0,0 +1,21 @@
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
+<suite name="seleniumTestADNe">
+ <test name="IEFunctionalTests">
+ <parameter name="browser" value="*iexplore"/>
+ <parameter name="loadStyleStrategy" value="ALL"/>
+ <parameter name="loadScriptStrategy" value="DEFAULT"/>
+ <parameter name="filterPrefix" value="/faces/NEKO/"/>
+ <packages>
+ <package name="org.richfaces.testng" />
+ </packages>
+ </test>
+ <test name="FireFoxFunctionalTestsADNe">
+ <parameter name="loadStyleStrategy" value="ALL"/>
+ <parameter name="loadScriptStrategy" value="DEFAULT"/>
+ <parameter name="filterPrefix" value="/faces/NEKO/"/>
+ <parameter name="browser" value="*firefox"/>
+ <packages>
+ <package name="org.richfaces.testng" />
+ </packages>
+ </test>
+</suite>
Added:
trunk/test-applications/seleniumTest/src/test/testng/win/testng_all_default_none.xml
===================================================================
--- trunk/test-applications/seleniumTest/src/test/testng/win/testng_all_default_none.xml
(rev 0)
+++
trunk/test-applications/seleniumTest/src/test/testng/win/testng_all_default_none.xml 2008-06-06
10:58:26 UTC (rev 8929)
@@ -0,0 +1,21 @@
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
+<suite name="seleniumTestADNo">
+ <test name="IEFunctionalTests">
+ <parameter name="browser" value="*iexplore"/>
+ <parameter name="loadStyleStrategy" value="ALL"/>
+ <parameter name="loadScriptStrategy" value="DEFAULT"/>
+ <parameter name="filterPrefix" value="/faces/NONE/"/>
+ <packages>
+ <package name="org.richfaces.testng" />
+ </packages>
+ </test>
+ <test name="FireFoxFunctionalTestsADNo">
+ <parameter name="loadStyleStrategy" value="ALL"/>
+ <parameter name="loadScriptStrategy" value="DEFAULT"/>
+ <parameter name="filterPrefix" value="/faces/NONE/"/>
+ <parameter name="browser" value="*firefox"/>
+ <packages>
+ <package name="org.richfaces.testng" />
+ </packages>
+ </test>
+</suite>
Added:
trunk/test-applications/seleniumTest/src/test/testng/win/testng_all_default_tidy.xml
===================================================================
--- trunk/test-applications/seleniumTest/src/test/testng/win/testng_all_default_tidy.xml
(rev 0)
+++
trunk/test-applications/seleniumTest/src/test/testng/win/testng_all_default_tidy.xml 2008-06-06
10:58:26 UTC (rev 8929)
@@ -0,0 +1,21 @@
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
+<suite name="seleniumTestADT">
+ <test name="IEFunctionalTests">
+ <parameter name="browser" value="*iexplore"/>
+ <parameter name="loadStyleStrategy" value="ALL"/>
+ <parameter name="loadScriptStrategy" value="DEFAULT"/>
+ <parameter name="filterPrefix" value="/faces/TIDY/"/>
+ <packages>
+ <package name="org.richfaces.testng" />
+ </packages>
+ </test>
+ <test name="FireFoxFunctionalTestsADT">
+ <parameter name="loadStyleStrategy" value="ALL"/>
+ <parameter name="loadScriptStrategy" value="DEFAULT"/>
+ <parameter name="filterPrefix" value="/faces/TIDY/"/>
+ <parameter name="browser" value="*firefox"/>
+ <packages>
+ <package name="org.richfaces.testng" />
+ </packages>
+ </test>
+</suite>
Added:
trunk/test-applications/seleniumTest/src/test/testng/win/testng_default_all_neko.xml
===================================================================
--- trunk/test-applications/seleniumTest/src/test/testng/win/testng_default_all_neko.xml
(rev 0)
+++
trunk/test-applications/seleniumTest/src/test/testng/win/testng_default_all_neko.xml 2008-06-06
10:58:26 UTC (rev 8929)
@@ -0,0 +1,21 @@
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
+<suite name="seleniumTestDANe">
+ <test name="IEFunctionalTests">
+ <parameter name="browser" value="*iexplore"/>
+ <parameter name="loadStyleStrategy" value="DEFAULT"/>
+ <parameter name="loadScriptStrategy" value="ALL"/>
+ <parameter name="filterPrefix" value="/faces/NEKO/"/>
+ <packages>
+ <package name="org.richfaces.testng" />
+ </packages>
+ </test>
+ <test name="FireFoxFunctionalTestsDANe">
+ <parameter name="loadStyleStrategy" value="DEFAULT"/>
+ <parameter name="loadScriptStrategy" value="ALL"/>
+ <parameter name="filterPrefix" value="/faces/NEKO/"/>
+ <parameter name="browser" value="*firefox"/>
+ <packages>
+ <package name="org.richfaces.testng" />
+ </packages>
+ </test>
+</suite>
Added:
trunk/test-applications/seleniumTest/src/test/testng/win/testng_default_all_none.xml
===================================================================
--- trunk/test-applications/seleniumTest/src/test/testng/win/testng_default_all_none.xml
(rev 0)
+++
trunk/test-applications/seleniumTest/src/test/testng/win/testng_default_all_none.xml 2008-06-06
10:58:26 UTC (rev 8929)
@@ -0,0 +1,21 @@
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
+<suite name="seleniumTestDANo">
+ <test name="IEFunctionalTests">
+ <parameter name="browser" value="*iexplore"/>
+ <parameter name="loadStyleStrategy" value="DEFAULT"/>
+ <parameter name="loadScriptStrategy" value="ALL"/>
+ <parameter name="filterPrefix" value="/faces/NONE/"/>
+ <packages>
+ <package name="org.richfaces.testng" />
+ </packages>
+ </test>
+ <test name="FireFoxFunctionalTestsDANo">
+ <parameter name="loadStyleStrategy" value="DEFAULT"/>
+ <parameter name="loadScriptStrategy" value="ALL"/>
+ <parameter name="filterPrefix" value="/faces/NONE/"/>
+ <parameter name="browser" value="*firefox"/>
+ <packages>
+ <package name="org.richfaces.testng" />
+ </packages>
+ </test>
+</suite>
Added:
trunk/test-applications/seleniumTest/src/test/testng/win/testng_default_all_tidy.xml
===================================================================
--- trunk/test-applications/seleniumTest/src/test/testng/win/testng_default_all_tidy.xml
(rev 0)
+++
trunk/test-applications/seleniumTest/src/test/testng/win/testng_default_all_tidy.xml 2008-06-06
10:58:26 UTC (rev 8929)
@@ -0,0 +1,21 @@
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
+<suite name="seleniumTestDAT">
+ <test name="IEFunctionalTests">
+ <parameter name="browser" value="*iexplore"/>
+ <parameter name="loadStyleStrategy" value="DEFAULT"/>
+ <parameter name="loadScriptStrategy" value="ALL"/>
+ <parameter name="filterPrefix" value="/faces/TIDY/"/>
+ <packages>
+ <package name="org.richfaces.testng" />
+ </packages>
+ </test>
+ <test name="FireFoxFunctionalTestsDAT">
+ <parameter name="loadStyleStrategy" value="DEFAULT"/>
+ <parameter name="loadScriptStrategy" value="ALL"/>
+ <parameter name="filterPrefix" value="/faces/TIDY/"/>
+ <parameter name="browser" value="*firefox"/>
+ <packages>
+ <package name="org.richfaces.testng" />
+ </packages>
+ </test>
+</suite>
Added:
trunk/test-applications/seleniumTest/src/test/testng/win/testng_default_default_neko.xml
===================================================================
---
trunk/test-applications/seleniumTest/src/test/testng/win/testng_default_default_neko.xml
(rev 0)
+++
trunk/test-applications/seleniumTest/src/test/testng/win/testng_default_default_neko.xml 2008-06-06
10:58:26 UTC (rev 8929)
@@ -0,0 +1,21 @@
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
+<suite name="seleniumTestDDNe">
+ <test name="IEFunctionalTests">
+ <parameter name="browser" value="*iexplore"/>
+ <parameter name="loadStyleStrategy" value="DEFAULT"/>
+ <parameter name="loadScriptStrategy" value="DEFAULT"/>
+ <parameter name="filterPrefix" value="/faces/NEKO/"/>
+ <packages>
+ <package name="org.richfaces.testng" />
+ </packages>
+ </test>
+ <test name="FireFoxFunctionalTestsDDNe">
+ <parameter name="loadStyleStrategy" value="DEFAULT"/>
+ <parameter name="loadScriptStrategy" value="DEFAULT"/>
+ <parameter name="filterPrefix" value="/faces/NEKO/"/>
+ <parameter name="browser" value="*firefox"/>
+ <packages>
+ <package name="org.richfaces.testng" />
+ </packages>
+ </test>
+</suite>
Added:
trunk/test-applications/seleniumTest/src/test/testng/win/testng_default_default_none.xml
===================================================================
---
trunk/test-applications/seleniumTest/src/test/testng/win/testng_default_default_none.xml
(rev 0)
+++
trunk/test-applications/seleniumTest/src/test/testng/win/testng_default_default_none.xml 2008-06-06
10:58:26 UTC (rev 8929)
@@ -0,0 +1,21 @@
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
+<suite name="seleniumTestDDNo">
+ <test name="IEFunctionalTests">
+ <parameter name="browser" value="*iexplore"/>
+ <parameter name="loadStyleStrategy" value="DEFAULT"/>
+ <parameter name="loadScriptStrategy" value="DEFAULT"/>
+ <parameter name="filterPrefix" value="/faces/NONE/"/>
+ <packages>
+ <package name="org.richfaces.testng" />
+ </packages>
+ </test>
+ <test name="FireFoxFunctionalTestsDDNo">
+ <parameter name="loadStyleStrategy" value="DEFAULT"/>
+ <parameter name="loadScriptStrategy" value="DEFAULT"/>
+ <parameter name="filterPrefix" value="/faces/NONE/"/>
+ <parameter name="browser" value="*firefox"/>
+ <packages>
+ <package name="org.richfaces.testng" />
+ </packages>
+ </test>
+</suite>
Added:
trunk/test-applications/seleniumTest/src/test/testng/win/testng_default_default_tidy.xml
===================================================================
---
trunk/test-applications/seleniumTest/src/test/testng/win/testng_default_default_tidy.xml
(rev 0)
+++
trunk/test-applications/seleniumTest/src/test/testng/win/testng_default_default_tidy.xml 2008-06-06
10:58:26 UTC (rev 8929)
@@ -0,0 +1,21 @@
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
+<suite name="seleniumTestDDT">
+ <test name="IEFunctionalTests">
+ <parameter name="browser" value="*iexplore"/>
+ <parameter name="loadStyleStrategy" value="DEFAULT"/>
+ <parameter name="loadScriptStrategy" value="DEFAULT"/>
+ <parameter name="filterPrefix" value="/faces/TIDY/"/>
+ <packages>
+ <package name="org.richfaces.testng" />
+ </packages>
+ </test>
+ <test name="FireFoxFunctionalTestsDDT">
+ <parameter name="loadStyleStrategy" value="DEFAULT"/>
+ <parameter name="loadScriptStrategy" value="DEFAULT"/>
+ <parameter name="filterPrefix" value="/faces/TIDY/"/>
+ <parameter name="browser" value="*firefox"/>
+ <packages>
+ <package name="org.richfaces.testng" />
+ </packages>
+ </test>
+</suite>