Author: nbelaevski
Date: 2008-06-06 19:23:38 -0400 (Fri, 06 Jun 2008)
New Revision: 8943
Removed:
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/SeleniumTestBaseNew.java
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/Templates.java
Modified:
trunk/test-applications/seleniumTest/pom.xml
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/RichSeleniumTest.java
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/SeleniumTestBase.java
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/AjaxCommandButtonTest.java
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/AjaxCommandLinkTest.java
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/AjaxPollTest.java
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/AjaxRegionTest.java
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/AjaxStatusTest.java
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/CalendarTest.java
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/ComboBoxTest.java
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/ContextMenuTest.java
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/DataTableTest.java
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/DropDownMenuTest.java
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/InplaceSelectTest.java
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/InputNumberSliderTest.java
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/InputNumberSpinnerTest.java
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/JSFunctionTest.java
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/KeepAliveTest.java
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/LoadScriptTest.java
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/LoadStyleTest.java
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/OrderingListTest.java
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/PanelBarTest.java
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/PanelMenuTest.java
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/PickListTest.java
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/ProgressBarTest.java
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/SimpleTogglePanelTest.java
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/SpacerTest.java
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/TabPanelTest.java
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/TogglePanelTest.java
trunk/test-applications/seleniumTest/src/test/testng/win/testng_default_default_neko.xml
Log:
Auto tests configuration updated
Modified: trunk/test-applications/seleniumTest/pom.xml
===================================================================
--- trunk/test-applications/seleniumTest/pom.xml 2008-06-06 23:16:49 UTC (rev 8942)
+++ trunk/test-applications/seleniumTest/pom.xml 2008-06-06 23:23:38 UTC (rev 8943)
@@ -76,7 +76,6 @@
</configuration>
</configuration>
<executions>
- <!--
<execution>
<id>start-container</id>
<phase>pre-integration-test</phase>
@@ -91,7 +90,6 @@
<goal>stop</goal>
</goals>
</execution>
- -->
</executions>
</plugin>
<plugin>
Modified:
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/RichSeleniumTest.java
===================================================================
---
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/RichSeleniumTest.java 2008-06-06
23:16:49 UTC (rev 8942)
+++
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/RichSeleniumTest.java 2008-06-06
23:23:38 UTC (rev 8943)
@@ -2,7 +2,7 @@
public interface RichSeleniumTest {
- public void startSelenium(String browser);
+ public void startSelenium(String browser, String filterPrefix);
public void stopSelenium();
Modified:
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/SeleniumTestBase.java
===================================================================
---
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/SeleniumTestBase.java 2008-06-06
23:16:49 UTC (rev 8942)
+++
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/SeleniumTestBase.java 2008-06-06
23:23:38 UTC (rev 8943)
@@ -21,9 +21,13 @@
package org.richfaces;
+import org.ajax4jsf.bean.Configurator;
import org.ajax4jsf.javascript.ScriptUtils;
import org.ajax4jsf.template.Template;
+import org.openqa.selenium.server.SeleniumServer;
import org.testng.Assert;
+import org.testng.annotations.AfterSuite;
+import org.testng.annotations.BeforeSuite;
import com.thoughtworks.selenium.DefaultSelenium;
@@ -60,6 +64,10 @@
/** Protocol */
public String protocol;
+ private String filterPrefix;
+
+ private SeleniumServer seleniumServer;
+
/** Defines the name of current j2ee application name */
public static final String APPLICATION_NAME = "seleniumTest";
@@ -75,6 +83,23 @@
this.protocol = protocol;
}
+ @BeforeSuite
+ public void startSeleniumServer() throws Exception {
+ seleniumServer = new SeleniumServer();
+ seleniumServer.start();
+ }
+
+
+ @AfterSuite
+ public void stopSeleniumServer() throws Exception {
+ seleniumServer.stop();
+ }
+
+ protected void loadConfiguration(String loadStyleStrategy, String loadScriptStrategy)
throws Exception {
+ Configurator.setLoadScriptStrategy(loadScriptStrategy);
+ Configurator.setLoadStyleStrategy(loadStyleStrategy);
+ }
+
/**
* @param url
* @param browser
@@ -84,14 +109,29 @@
return new DefaultSelenium(host, 4444, browser, url);
}
+ private static final Object MUTEX = new Object();
+
/**
* This method are invoking before selenium tests started
*/
- protected void startSelenium(String browser) {
- selenium = createSeleniumClient(protocol + "://" + host + ":"
+ port + "/", browser);
- selenium.start();
+ protected void startSelenium(String browser, String filterPrefix) {
+ synchronized (MUTEX) {
+ this.filterPrefix = filterPrefix;
+ selenium = createSeleniumClient(protocol + "://" + host +
":" + port + "/", browser);
+ selenium.start();
+ }
}
+ /**
+ * This method are invoking after selenium tests completed
+ */
+ protected void stopSelenium() {
+ synchronized (MUTEX) {
+ selenium.stop();
+ selenium = null;
+ }
+ }
+
// /**
// * Renders page
// */
@@ -138,7 +178,7 @@
* Renders page
*/
protected void renderPage(Template template) {
- selenium.open(protocol + "://" + host + ":" + port +
"/" + APPLICATION_NAME + getTestUrl());
+ selenium.open(protocol + "://" + host + ":" + port +
"/" + APPLICATION_NAME + filterPrefix + getTestUrl());
selenium.waitForPageToLoad(String.valueOf(pageRenderTime));
setParentId(template.getPrefix());
@@ -206,14 +246,6 @@
}
/**
- * 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.
*/
Deleted:
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/SeleniumTestBaseNew.java
===================================================================
---
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/SeleniumTestBaseNew.java 2008-06-06
23:16:49 UTC (rev 8942)
+++
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/SeleniumTestBaseNew.java 2008-06-06
23:23:38 UTC (rev 8943)
@@ -1,696 +0,0 @@
-/**
- * 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.ajax4jsf.template.Template;
-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"));
- }
-
-}
Deleted: trunk/test-applications/seleniumTest/src/test/java/org/richfaces/Templates.java
===================================================================
---
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/Templates.java 2008-06-06
23:16:49 UTC (rev 8942)
+++
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/Templates.java 2008-06-06
23:23:38 UTC (rev 8943)
@@ -1,66 +0,0 @@
-package org.richfaces;
-
-import org.ajax4jsf.template.Template;
-
-
-
-public class Templates {
-
- 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");
-
- public static final String COMPONENT_PREFIX_INSIDE_TABLE =
"_Selenium_Test_DataTable:0:";
-
- public static final String COMPONENT_PREFIX_SIMPLE = "";
-
- 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
23:16:49 UTC (rev 8942)
+++
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/AjaxCommandButtonTest.java 2008-06-06
23:23:38 UTC (rev 8943)
@@ -1,21 +1,16 @@
package org.richfaces.testng;
-import org.openqa.selenium.server.SeleniumServer;
+import org.ajax4jsf.template.Template;
+import org.richfaces.RichSeleniumTest;
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.AfterMethod;
+import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;
-public class AjaxCommandButtonTest extends SeleniumTestBaseNew {
+public class AjaxCommandButtonTest extends SeleniumTestBase implements RichSeleniumTest
{
public AjaxCommandButtonTest() {
@@ -25,14 +20,14 @@
/**
* This method are invoking before selenium tests started
*/
- @BeforeTest
+ @BeforeMethod
@Parameters({"browser", "filterPrefix"})
public void startSelenium(String browser, String filterPrefix) {
super.startSelenium(browser, filterPrefix);
}
- @BeforeTest
+ @BeforeMethod
@Parameters({"loadStyleStrategy", "loadScriptStrategy"})
protected void loadConfiguration(String loadStyleStrategy, String loadScriptStrategy)
throws Exception {
super.loadConfiguration(loadStyleStrategy, loadScriptStrategy);
@@ -41,19 +36,19 @@
/**
* This method are invoking after selenium tests completed
*/
- @AfterTest
+ @AfterMethod(alwaysRun=true)
public void stopSelenium() {
super.stopSelenium();
}
@Test
public void testAjaxCommandButtonComponent() throws Exception {
- _testAjaxCommandButtonComponent(Templates.SIMPLE);
- _testAjaxCommandButtonComponent(Templates.DATATABLE);
- _testAjaxCommandButtonComponent(Templates.MODALPANEL);
+ _testAjaxCommandButtonComponent(Template.SIMPLE);
+ _testAjaxCommandButtonComponent(Template.DATA_TABLE);
+ _testAjaxCommandButtonComponent(Template.MODAL_PANEL);
}
- private void _testAjaxCommandButtonComponent(Templates template) {
+ private void _testAjaxCommandButtonComponent(Template template) {
renderPage(template);
String parentId = getParentId() + "_form:";
@@ -135,7 +130,7 @@
}
- public String getTestPrefix() {
+ public String getTestUrl() {
return "pages/ajaxCommandButton/ajaxButtonTest.xhtml";
}
Modified:
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/AjaxCommandLinkTest.java
===================================================================
---
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/AjaxCommandLinkTest.java 2008-06-06
23:16:49 UTC (rev 8942)
+++
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/AjaxCommandLinkTest.java 2008-06-06
23:23:38 UTC (rev 8943)
@@ -4,8 +4,8 @@
import org.richfaces.RichSeleniumTest;
import org.richfaces.SeleniumTestBase;
import org.testng.Assert;
-import org.testng.annotations.AfterTest;
-import org.testng.annotations.BeforeTest;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;
@@ -19,16 +19,23 @@
/**
* This method are invoking before selenium tests started
*/
- @BeforeTest
- @Parameters( { "browser" })
- public void startSelenium(String browser) {
- super.startSelenium(browser);
+ @BeforeMethod
+ @Parameters({"browser", "filterPrefix"})
+ public void startSelenium(String browser, String filterPrefix) {
+ super.startSelenium(browser, filterPrefix);
}
+
+ @BeforeMethod
+ @Parameters({"loadStyleStrategy", "loadScriptStrategy"})
+ protected void loadConfiguration(String loadStyleStrategy, String loadScriptStrategy)
throws Exception {
+ super.loadConfiguration(loadStyleStrategy, loadScriptStrategy);
+ }
+
/**
* This method are invoking after selenium tests completed
*/
- @AfterTest
+ @AfterMethod(alwaysRun=true)
public void stopSelenium() {
super.stopSelenium();
}
@@ -123,7 +130,7 @@
}
public String getTestUrl() {
- return "/faces/pages/ajaxCommandLink/ajaxLinkTest.xhtml";
+ return "pages/ajaxCommandLink/ajaxLinkTest.xhtml";
}
}
Modified:
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/AjaxPollTest.java
===================================================================
---
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/AjaxPollTest.java 2008-06-06
23:16:49 UTC (rev 8942)
+++
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/AjaxPollTest.java 2008-06-06
23:23:38 UTC (rev 8943)
@@ -7,8 +7,8 @@
import org.richfaces.RichSeleniumTest;
import org.richfaces.SeleniumTestBase;
import org.testng.Assert;
-import org.testng.annotations.AfterTest;
-import org.testng.annotations.BeforeTest;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;
@@ -25,16 +25,23 @@
/**
* This method are invoking before selenium tests started
*/
- @BeforeTest
- @Parameters( { "browser" })
- public void startSelenium(String browser) {
- super.startSelenium(browser);
+ @BeforeMethod
+ @Parameters({"browser", "filterPrefix"})
+ public void startSelenium(String browser, String filterPrefix) {
+ super.startSelenium(browser, filterPrefix);
}
+
+
+ @BeforeMethod
+ @Parameters({"loadStyleStrategy", "loadScriptStrategy"})
+ protected void loadConfiguration(String loadStyleStrategy, String loadScriptStrategy)
throws Exception {
+ super.loadConfiguration(loadStyleStrategy, loadScriptStrategy);
+ }
/**
* This method are invoking after selenium tests completed
*/
- @AfterTest
+ @AfterMethod(alwaysRun=true)
public void stopSelenium() {
super.stopSelenium();
}
@@ -87,7 +94,7 @@
* @see org.ajax4jsf.test.base.RichSeleniumTest#getTestUrl()
*/
public String getTestUrl() {
- return "/faces/pages/ajaxPoll/ajaxPollTest.xhtml";
+ return "pages/ajaxPoll/ajaxPollTest.xhtml";
}
}
Modified:
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/AjaxRegionTest.java
===================================================================
---
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/AjaxRegionTest.java 2008-06-06
23:16:49 UTC (rev 8942)
+++
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/AjaxRegionTest.java 2008-06-06
23:23:38 UTC (rev 8943)
@@ -3,8 +3,8 @@
import org.ajax4jsf.template.Template;
import org.richfaces.RichSeleniumTest;
import org.richfaces.SeleniumTestBase;
-import org.testng.annotations.AfterTest;
-import org.testng.annotations.BeforeTest;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;
@@ -17,16 +17,23 @@
/**
* This method are invoking before selenium tests started
*/
- @BeforeTest
- @Parameters( { "browser" })
- public void startSelenium(String browser) {
- super.startSelenium(browser);
+ @BeforeMethod
+ @Parameters({"browser", "filterPrefix"})
+ public void startSelenium(String browser, String filterPrefix) {
+ super.startSelenium(browser, filterPrefix);
}
+
+
+ @BeforeMethod
+ @Parameters({"loadStyleStrategy", "loadScriptStrategy"})
+ protected void loadConfiguration(String loadStyleStrategy, String loadScriptStrategy)
throws Exception {
+ super.loadConfiguration(loadStyleStrategy, loadScriptStrategy);
+ }
/**
* This method are invoking after selenium tests completed
*/
- @AfterTest
+ @AfterMethod(alwaysRun=true)
public void stopSelenium() {
super.stopSelenium();
}
@@ -93,7 +100,7 @@
}
public String getTestUrl() {
- return "/faces/pages/ajaxRegion/ajaxRegionTest.xhtml";
+ return "pages/ajaxRegion/ajaxRegionTest.xhtml";
}
}
Modified:
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/AjaxStatusTest.java
===================================================================
---
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/AjaxStatusTest.java 2008-06-06
23:16:49 UTC (rev 8942)
+++
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/AjaxStatusTest.java 2008-06-06
23:23:38 UTC (rev 8943)
@@ -4,8 +4,8 @@
import org.richfaces.RichSeleniumTest;
import org.richfaces.SeleniumTestBase;
import org.testng.Assert;
-import org.testng.annotations.AfterTest;
-import org.testng.annotations.BeforeTest;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;
@@ -18,16 +18,23 @@
/**
* This method are invoking before selenium tests started
*/
- @BeforeTest
- @Parameters( { "browser" })
- public void startSelenium(String browser) {
- super.startSelenium(browser);
+ @BeforeMethod
+ @Parameters({"browser", "filterPrefix"})
+ public void startSelenium(String browser, String filterPrefix) {
+ super.startSelenium(browser, filterPrefix);
}
+
+
+ @BeforeMethod
+ @Parameters({"loadStyleStrategy", "loadScriptStrategy"})
+ protected void loadConfiguration(String loadStyleStrategy, String loadScriptStrategy)
throws Exception {
+ super.loadConfiguration(loadStyleStrategy, loadScriptStrategy);
+ }
/**
* This method are invoking after selenium tests completed
*/
- @AfterTest
+ @AfterMethod(alwaysRun=true)
public void stopSelenium() {
super.stopSelenium();
}
@@ -86,6 +93,6 @@
}
public String getTestUrl() {
- return "/faces/pages/ajaxStatus/ajaxStatusTest.xhtml";
+ return "pages/ajaxStatus/ajaxStatusTest.xhtml";
}
}
Modified:
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/CalendarTest.java
===================================================================
---
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/CalendarTest.java 2008-06-06
23:16:49 UTC (rev 8942)
+++
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/CalendarTest.java 2008-06-06
23:23:38 UTC (rev 8943)
@@ -29,8 +29,8 @@
import org.richfaces.RichSeleniumTest;
import org.richfaces.SeleniumTestBase;
import org.testng.Assert;
-import org.testng.annotations.AfterTest;
-import org.testng.annotations.BeforeTest;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;
@@ -47,16 +47,23 @@
/**
* This method are invoking before selenium tests started
*/
- @BeforeTest
- @Parameters( { "browser" })
- public void startSelenium(String browser) {
- super.startSelenium(browser);
+ @BeforeMethod
+ @Parameters({"browser", "filterPrefix"})
+ public void startSelenium(String browser, String filterPrefix) {
+ super.startSelenium(browser, filterPrefix);
}
+
+ @BeforeMethod
+ @Parameters({"loadStyleStrategy", "loadScriptStrategy"})
+ protected void loadConfiguration(String loadStyleStrategy, String loadScriptStrategy)
throws Exception {
+ super.loadConfiguration(loadStyleStrategy, loadScriptStrategy);
+ }
+
/**
* This method are invoking after selenium tests completed
*/
- @AfterTest
+ @AfterMethod(alwaysRun=true)
public void stopSelenium() {
super.stopSelenium();
}
@@ -141,6 +148,6 @@
}
public String getTestUrl() {
- return "/faces/pages/calendar/calendarTest.xhtml";
+ return "pages/calendar/calendarTest.xhtml";
}
}
Modified:
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/ComboBoxTest.java
===================================================================
---
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/ComboBoxTest.java 2008-06-06
23:16:49 UTC (rev 8942)
+++
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/ComboBoxTest.java 2008-06-06
23:23:38 UTC (rev 8943)
@@ -4,8 +4,8 @@
import org.richfaces.RichSeleniumTest;
import org.richfaces.SeleniumTestBase;
import org.testng.Assert;
-import org.testng.annotations.AfterTest;
-import org.testng.annotations.BeforeTest;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;
@@ -18,16 +18,23 @@
/**
* This method are invoking before selenium tests started
*/
- @BeforeTest
- @Parameters( { "browser" })
- public void startSelenium(String browser) {
- super.startSelenium(browser);
+ @BeforeMethod
+ @Parameters({"browser", "filterPrefix"})
+ public void startSelenium(String browser, String filterPrefix) {
+ super.startSelenium(browser, filterPrefix);
}
+
+
+ @BeforeMethod
+ @Parameters({"loadStyleStrategy", "loadScriptStrategy"})
+ protected void loadConfiguration(String loadStyleStrategy, String loadScriptStrategy)
throws Exception {
+ super.loadConfiguration(loadStyleStrategy, loadScriptStrategy);
+ }
/**
* This method are invoking after selenium tests completed
*/
- @AfterTest
+ @AfterMethod(alwaysRun=true)
public void stopSelenium() {
super.stopSelenium();
}
@@ -96,7 +103,7 @@
}
public String getTestUrl() {
- return "/faces/pages/comboBox/comboBoxTest.xhtml";
+ return "pages/comboBox/comboBoxTest.xhtml";
}
}
\ No newline at end of file
Modified:
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/ContextMenuTest.java
===================================================================
---
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/ContextMenuTest.java 2008-06-06
23:16:49 UTC (rev 8942)
+++
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/ContextMenuTest.java 2008-06-06
23:23:38 UTC (rev 8943)
@@ -25,8 +25,8 @@
import org.richfaces.RichSeleniumTest;
import org.richfaces.SeleniumTestBase;
import org.testng.Assert;
-import org.testng.annotations.AfterTest;
-import org.testng.annotations.BeforeTest;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;
@@ -39,16 +39,23 @@
/**
* This method are invoking before selenium tests started
*/
- @BeforeTest
- @Parameters( { "browser" })
- public void startSelenium(String browser) {
- super.startSelenium(browser);
+ @BeforeMethod
+ @Parameters({"browser", "filterPrefix"})
+ public void startSelenium(String browser, String filterPrefix) {
+ super.startSelenium(browser, filterPrefix);
}
+
+
+ @BeforeMethod
+ @Parameters({"loadStyleStrategy", "loadScriptStrategy"})
+ protected void loadConfiguration(String loadStyleStrategy, String loadScriptStrategy)
throws Exception {
+ super.loadConfiguration(loadStyleStrategy, loadScriptStrategy);
+ }
/**
* This method are invoking after selenium tests completed
*/
- @AfterTest
+ @AfterMethod(alwaysRun=true)
public void stopSelenium() {
super.stopSelenium();
}
@@ -117,7 +124,7 @@
}
public String getTestUrl() {
- return "/faces/pages/contextMenu/contextMenu.xhtml";
+ return "pages/contextMenu/contextMenu.xhtml";
}
}
Modified:
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/DataTableTest.java
===================================================================
---
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/DataTableTest.java 2008-06-06
23:16:49 UTC (rev 8942)
+++
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/DataTableTest.java 2008-06-06
23:23:38 UTC (rev 8943)
@@ -4,8 +4,8 @@
import org.richfaces.RichSeleniumTest;
import org.richfaces.SeleniumTestBase;
import org.testng.Assert;
-import org.testng.annotations.AfterTest;
-import org.testng.annotations.BeforeTest;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;
@@ -18,22 +18,29 @@
/**
* This method are invoking before selenium tests started
*/
- @BeforeTest
- @Parameters( { "browser" })
- public void startSelenium(String browser) {
- super.startSelenium(browser);
+ @BeforeMethod
+ @Parameters({"browser", "filterPrefix"})
+ public void startSelenium(String browser, String filterPrefix) {
+ super.startSelenium(browser, filterPrefix);
}
+
+
+ @BeforeMethod
+ @Parameters({"loadStyleStrategy", "loadScriptStrategy"})
+ protected void loadConfiguration(String loadStyleStrategy, String loadScriptStrategy)
throws Exception {
+ super.loadConfiguration(loadStyleStrategy, loadScriptStrategy);
+ }
/**
* This method are invoking after selenium tests completed
*/
- @AfterTest
+ @AfterMethod(alwaysRun=true)
public void stopSelenium() {
super.stopSelenium();
}
public String getTestUrl() {
- return "/faces/pages/dataTable/dataTableTest.xhtml";
+ return "pages/dataTable/dataTableTest.xhtml";
}
@Test
Modified:
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/DropDownMenuTest.java
===================================================================
---
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/DropDownMenuTest.java 2008-06-06
23:16:49 UTC (rev 8942)
+++
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/DropDownMenuTest.java 2008-06-06
23:23:38 UTC (rev 8943)
@@ -3,8 +3,8 @@
import org.ajax4jsf.template.Template;
import org.richfaces.RichSeleniumTest;
import org.richfaces.SeleniumTestBase;
-import org.testng.annotations.AfterTest;
-import org.testng.annotations.BeforeTest;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;
@@ -17,16 +17,23 @@
/**
* This method are invoking before selenium tests started
*/
- @BeforeTest
- @Parameters( { "browser" })
- public void startSelenium(String browser) {
- super.startSelenium(browser);
+ @BeforeMethod
+ @Parameters({"browser", "filterPrefix"})
+ public void startSelenium(String browser, String filterPrefix) {
+ super.startSelenium(browser, filterPrefix);
}
+
+
+ @BeforeMethod
+ @Parameters({"loadStyleStrategy", "loadScriptStrategy"})
+ protected void loadConfiguration(String loadStyleStrategy, String loadScriptStrategy)
throws Exception {
+ super.loadConfiguration(loadStyleStrategy, loadScriptStrategy);
+ }
/**
* This method are invoking after selenium tests completed
*/
- @AfterTest
+ @AfterMethod(alwaysRun=true)
public void stopSelenium() {
super.stopSelenium();
}
@@ -89,7 +96,7 @@
}
public String getTestUrl() {
- return "/faces/pages/dropDownMenu/dropDownMenuTest.xhtml";
+ return "pages/dropDownMenu/dropDownMenuTest.xhtml";
}
}
Modified:
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/InplaceSelectTest.java
===================================================================
---
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/InplaceSelectTest.java 2008-06-06
23:16:49 UTC (rev 8942)
+++
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/InplaceSelectTest.java 2008-06-06
23:23:38 UTC (rev 8943)
@@ -4,8 +4,8 @@
import org.richfaces.RichSeleniumTest;
import org.richfaces.SeleniumTestBase;
import org.testng.Assert;
-import org.testng.annotations.AfterTest;
-import org.testng.annotations.BeforeTest;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;
@@ -18,16 +18,23 @@
/**
* This method are invoking before selenium tests started
*/
- @BeforeTest
- @Parameters( { "browser" })
- public void startSelenium(String browser) {
- super.startSelenium(browser);
+ @BeforeMethod
+ @Parameters({"browser", "filterPrefix"})
+ public void startSelenium(String browser, String filterPrefix) {
+ super.startSelenium(browser, filterPrefix);
}
+
+
+ @BeforeMethod
+ @Parameters({"loadStyleStrategy", "loadScriptStrategy"})
+ protected void loadConfiguration(String loadStyleStrategy, String loadScriptStrategy)
throws Exception {
+ super.loadConfiguration(loadStyleStrategy, loadScriptStrategy);
+ }
/**
* This method are invoking after selenium tests completed
*/
- @AfterTest
+ @AfterMethod(alwaysRun=true)
public void stopSelenium() {
super.stopSelenium();
}
@@ -104,7 +111,7 @@
}
public String getTestUrl() {
- return "/faces/pages/inplaceSelect/inplaceSelectTest.xhtml";
+ return "pages/inplaceSelect/inplaceSelectTest.xhtml";
}
}
Modified:
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/InputNumberSliderTest.java
===================================================================
---
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/InputNumberSliderTest.java 2008-06-06
23:16:49 UTC (rev 8942)
+++
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/InputNumberSliderTest.java 2008-06-06
23:23:38 UTC (rev 8943)
@@ -24,8 +24,8 @@
import org.richfaces.RichSeleniumTest;
import org.richfaces.SeleniumTestBase;
import org.testng.Assert;
-import org.testng.annotations.AfterTest;
-import org.testng.annotations.BeforeTest;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;
@@ -39,16 +39,23 @@
/**
* This method are invoking before selenium tests started
*/
- @BeforeTest
- @Parameters( { "browser" })
- public void startSelenium(String browser) {
- super.startSelenium(browser);
+ @BeforeMethod
+ @Parameters({"browser", "filterPrefix"})
+ public void startSelenium(String browser, String filterPrefix) {
+ super.startSelenium(browser, filterPrefix);
}
+
+
+ @BeforeMethod
+ @Parameters({"loadStyleStrategy", "loadScriptStrategy"})
+ protected void loadConfiguration(String loadStyleStrategy, String loadScriptStrategy)
throws Exception {
+ super.loadConfiguration(loadStyleStrategy, loadScriptStrategy);
+ }
/**
* This method are invoking after selenium tests completed
*/
- @AfterTest
+ @AfterMethod(alwaysRun=true)
public void stopSelenium() {
super.stopSelenium();
}
@@ -135,6 +142,6 @@
}
public String getTestUrl() {
- return "/faces/pages/inputNumberSlider/inputNumberSliderTest.xhtml";
+ return "pages/inputNumberSlider/inputNumberSliderTest.xhtml";
}
}
Modified:
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/InputNumberSpinnerTest.java
===================================================================
---
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/InputNumberSpinnerTest.java 2008-06-06
23:16:49 UTC (rev 8942)
+++
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/InputNumberSpinnerTest.java 2008-06-06
23:23:38 UTC (rev 8943)
@@ -4,8 +4,8 @@
import org.richfaces.RichSeleniumTest;
import org.richfaces.SeleniumTestBase;
import org.testng.Assert;
-import org.testng.annotations.AfterTest;
-import org.testng.annotations.BeforeTest;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;
@@ -19,16 +19,23 @@
/**
* This method are invoking before selenium tests started
*/
- @BeforeTest
- @Parameters( { "browser" })
- public void startSelenium(String browser) {
- super.startSelenium(browser);
+ @BeforeMethod
+ @Parameters({"browser", "filterPrefix"})
+ public void startSelenium(String browser, String filterPrefix) {
+ super.startSelenium(browser, filterPrefix);
}
+
+
+ @BeforeMethod
+ @Parameters({"loadStyleStrategy", "loadScriptStrategy"})
+ protected void loadConfiguration(String loadStyleStrategy, String loadScriptStrategy)
throws Exception {
+ super.loadConfiguration(loadStyleStrategy, loadScriptStrategy);
+ }
/**
* This method are invoking after selenium tests completed
*/
- @AfterTest
+ @AfterMethod(alwaysRun=true)
public void stopSelenium() {
super.stopSelenium();
}
@@ -90,7 +97,7 @@
}
public String getTestUrl() {
- return "/faces/pages/inputNumberSpinner/inputNumberSpinnerTest.xhtml";
+ return "pages/inputNumberSpinner/inputNumberSpinnerTest.xhtml";
}
}
Modified:
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/JSFunctionTest.java
===================================================================
---
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/JSFunctionTest.java 2008-06-06
23:16:49 UTC (rev 8942)
+++
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/JSFunctionTest.java 2008-06-06
23:23:38 UTC (rev 8943)
@@ -2,12 +2,11 @@
import static org.testng.Assert.assertEquals;
-
import org.ajax4jsf.template.Template;
import org.richfaces.RichSeleniumTest;
import org.richfaces.SeleniumTestBase;
-import org.testng.annotations.AfterTest;
-import org.testng.annotations.BeforeTest;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;
@@ -20,16 +19,23 @@
/**
* This method are invoking before selenium tests started
*/
- @BeforeTest
- @Parameters( { "browser" })
- public void startSelenium(String browser) {
- super.startSelenium(browser);
+ @BeforeMethod
+ @Parameters({"browser", "filterPrefix"})
+ public void startSelenium(String browser, String filterPrefix) {
+ super.startSelenium(browser, filterPrefix);
}
+
+
+ @BeforeMethod
+ @Parameters({"loadStyleStrategy", "loadScriptStrategy"})
+ protected void loadConfiguration(String loadStyleStrategy, String loadScriptStrategy)
throws Exception {
+ super.loadConfiguration(loadStyleStrategy, loadScriptStrategy);
+ }
/**
* This method are invoking after selenium tests completed
*/
- @AfterTest
+ @AfterMethod(alwaysRun=true)
public void stopSelenium() {
super.stopSelenium();
}
@@ -59,7 +65,7 @@
}
public String getTestUrl() {
- return "/faces/pages/jsFunction/jsFunctionTest.xhtml";
+ return "pages/jsFunction/jsFunctionTest.xhtml";
}
}
Modified:
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/KeepAliveTest.java
===================================================================
---
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/KeepAliveTest.java 2008-06-06
23:16:49 UTC (rev 8942)
+++
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/KeepAliveTest.java 2008-06-06
23:23:38 UTC (rev 8943)
@@ -3,8 +3,8 @@
import org.ajax4jsf.template.Template;
import org.richfaces.RichSeleniumTest;
import org.richfaces.SeleniumTestBase;
-import org.testng.annotations.AfterTest;
-import org.testng.annotations.BeforeTest;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;
@@ -17,16 +17,23 @@
/**
* This method are invoking before selenium tests started
*/
- @BeforeTest
- @Parameters( { "browser" })
- public void startSelenium(String browser) {
- super.startSelenium(browser);
+ @BeforeMethod
+ @Parameters({"browser", "filterPrefix"})
+ public void startSelenium(String browser, String filterPrefix) {
+ super.startSelenium(browser, filterPrefix);
}
+
+
+ @BeforeMethod
+ @Parameters({"loadStyleStrategy", "loadScriptStrategy"})
+ protected void loadConfiguration(String loadStyleStrategy, String loadScriptStrategy)
throws Exception {
+ super.loadConfiguration(loadStyleStrategy, loadScriptStrategy);
+ }
/**
* This method are invoking after selenium tests completed
*/
- @AfterTest
+ @AfterMethod(alwaysRun=true)
public void stopSelenium() {
super.stopSelenium();
}
@@ -85,7 +92,7 @@
}
public String getTestUrl() {
- return "/faces/pages/keepAlive/keepAliveTest.xhtml";
+ return "pages/keepAlive/keepAliveTest.xhtml";
}
}
Modified:
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/LoadScriptTest.java
===================================================================
---
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/LoadScriptTest.java 2008-06-06
23:16:49 UTC (rev 8942)
+++
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/LoadScriptTest.java 2008-06-06
23:23:38 UTC (rev 8943)
@@ -5,8 +5,8 @@
import org.ajax4jsf.template.Template;
import org.richfaces.RichSeleniumTest;
import org.richfaces.SeleniumTestBase;
-import org.testng.annotations.AfterTest;
-import org.testng.annotations.BeforeTest;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;
@@ -19,16 +19,23 @@
/**
* This method are invoking before selenium tests started
*/
- @BeforeTest
- @Parameters( { "browser" })
- public void startSelenium(String browser) {
- super.startSelenium(browser);
+ @BeforeMethod
+ @Parameters({"browser", "filterPrefix"})
+ public void startSelenium(String browser, String filterPrefix) {
+ super.startSelenium(browser, filterPrefix);
}
+
+
+ @BeforeMethod
+ @Parameters({"loadStyleStrategy", "loadScriptStrategy"})
+ protected void loadConfiguration(String loadStyleStrategy, String loadScriptStrategy)
throws Exception {
+ super.loadConfiguration(loadStyleStrategy, loadScriptStrategy);
+ }
/**
* This method are invoking after selenium tests completed
*/
- @AfterTest
+ @AfterMethod(alwaysRun=true)
public void stopSelenium() {
super.stopSelenium();
}
@@ -50,7 +57,7 @@
}
public String getTestUrl() {
- return "/faces/pages/loadScript/loadScriptTest.xhtml";
+ return "pages/loadScript/loadScriptTest.xhtml";
}
}
Modified:
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/LoadStyleTest.java
===================================================================
---
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/LoadStyleTest.java 2008-06-06
23:16:49 UTC (rev 8942)
+++
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/LoadStyleTest.java 2008-06-06
23:23:38 UTC (rev 8943)
@@ -6,8 +6,8 @@
import org.ajax4jsf.template.Template;
import org.richfaces.RichSeleniumTest;
import org.richfaces.SeleniumTestBase;
-import org.testng.annotations.AfterTest;
-import org.testng.annotations.BeforeTest;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;
@@ -20,16 +20,23 @@
/**
* This method are invoking before selenium tests started
*/
- @BeforeTest
- @Parameters( { "browser" })
- public void startSelenium(String browser) {
- super.startSelenium(browser);
+ @BeforeMethod
+ @Parameters({"browser", "filterPrefix"})
+ public void startSelenium(String browser, String filterPrefix) {
+ super.startSelenium(browser, filterPrefix);
}
+
+
+ @BeforeMethod
+ @Parameters({"loadStyleStrategy", "loadScriptStrategy"})
+ protected void loadConfiguration(String loadStyleStrategy, String loadScriptStrategy)
throws Exception {
+ super.loadConfiguration(loadStyleStrategy, loadScriptStrategy);
+ }
/**
* This method are invoking after selenium tests completed
*/
- @AfterTest
+ @AfterMethod(alwaysRun=true)
public void stopSelenium() {
super.stopSelenium();
}
@@ -49,7 +56,7 @@
}
public String getTestUrl() {
- return "/faces/pages/loadStyle/loadStyleTest.xhtml";
+ return "pages/loadStyle/loadStyleTest.xhtml";
}
}
Modified:
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/OrderingListTest.java
===================================================================
---
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/OrderingListTest.java 2008-06-06
23:16:49 UTC (rev 8942)
+++
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/OrderingListTest.java 2008-06-06
23:23:38 UTC (rev 8943)
@@ -25,8 +25,8 @@
import org.richfaces.RichSeleniumTest;
import org.richfaces.SeleniumTestBase;
import org.testng.Assert;
-import org.testng.annotations.AfterTest;
-import org.testng.annotations.BeforeTest;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;
@@ -72,16 +72,23 @@
/**
* This method are invoking before selenium tests started
*/
- @BeforeTest
- @Parameters( { "browser" })
- public void startSelenium(String browser) {
- super.startSelenium(browser);
+ @BeforeMethod
+ @Parameters({"browser", "filterPrefix"})
+ public void startSelenium(String browser, String filterPrefix) {
+ super.startSelenium(browser, filterPrefix);
}
+
+
+ @BeforeMethod
+ @Parameters({"loadStyleStrategy", "loadScriptStrategy"})
+ protected void loadConfiguration(String loadStyleStrategy, String loadScriptStrategy)
throws Exception {
+ super.loadConfiguration(loadStyleStrategy, loadScriptStrategy);
+ }
/**
* This method are invoking after selenium tests completed
*/
- @AfterTest
+ @AfterMethod(alwaysRun=true)
public void stopSelenium() {
super.stopSelenium();
}
@@ -234,7 +241,7 @@
}
public String getTestUrl() {
- return "/faces/pages/orderingList/orderingListTest.xhtml";
+ return "pages/orderingList/orderingListTest.xhtml";
}
}
Modified:
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/PanelBarTest.java
===================================================================
---
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/PanelBarTest.java 2008-06-06
23:16:49 UTC (rev 8942)
+++
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/PanelBarTest.java 2008-06-06
23:23:38 UTC (rev 8943)
@@ -25,8 +25,8 @@
import org.richfaces.RichSeleniumTest;
import org.richfaces.SeleniumTestBase;
import org.testng.Assert;
-import org.testng.annotations.AfterTest;
-import org.testng.annotations.BeforeTest;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;
@@ -39,16 +39,23 @@
/**
* This method are invoking before selenium tests started
*/
- @BeforeTest
- @Parameters( { "browser" })
- public void startSelenium(String browser) {
- super.startSelenium(browser);
+ @BeforeMethod
+ @Parameters({"browser", "filterPrefix"})
+ public void startSelenium(String browser, String filterPrefix) {
+ super.startSelenium(browser, filterPrefix);
}
+
+
+ @BeforeMethod
+ @Parameters({"loadStyleStrategy", "loadScriptStrategy"})
+ protected void loadConfiguration(String loadStyleStrategy, String loadScriptStrategy)
throws Exception {
+ super.loadConfiguration(loadStyleStrategy, loadScriptStrategy);
+ }
/**
* This method are invoking after selenium tests completed
*/
- @AfterTest
+ @AfterMethod(alwaysRun=true)
public void stopSelenium() {
super.stopSelenium();
}
@@ -101,7 +108,7 @@
}
public String getTestUrl() {
- return "/faces/pages/panelBar/panelBarTest.xhtml";
+ return "pages/panelBar/panelBarTest.xhtml";
}
}
Modified:
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/PanelMenuTest.java
===================================================================
---
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/PanelMenuTest.java 2008-06-06
23:16:49 UTC (rev 8942)
+++
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/PanelMenuTest.java 2008-06-06
23:23:38 UTC (rev 8943)
@@ -4,8 +4,8 @@
import org.richfaces.RichSeleniumTest;
import org.richfaces.SeleniumTestBase;
import org.testng.Assert;
-import org.testng.annotations.AfterTest;
-import org.testng.annotations.BeforeTest;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;
@@ -18,16 +18,23 @@
/**
* This method are invoking before selenium tests started
*/
- @BeforeTest
- @Parameters( { "browser" })
- public void startSelenium(String browser) {
- super.startSelenium(browser);
+ @BeforeMethod
+ @Parameters({"browser", "filterPrefix"})
+ public void startSelenium(String browser, String filterPrefix) {
+ super.startSelenium(browser, filterPrefix);
}
+
+
+ @BeforeMethod
+ @Parameters({"loadStyleStrategy", "loadScriptStrategy"})
+ protected void loadConfiguration(String loadStyleStrategy, String loadScriptStrategy)
throws Exception {
+ super.loadConfiguration(loadStyleStrategy, loadScriptStrategy);
+ }
/**
* This method are invoking after selenium tests completed
*/
- @AfterTest
+ @AfterMethod(alwaysRun=true)
public void stopSelenium() {
super.stopSelenium();
}
@@ -274,7 +281,7 @@
}
public String getTestUrl() {
- return "/faces/pages/panelMenu/panelMenuTest.xhtml";
+ return "pages/panelMenu/panelMenuTest.xhtml";
}
private void tearDown() {
Modified:
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/PickListTest.java
===================================================================
---
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/PickListTest.java 2008-06-06
23:16:49 UTC (rev 8942)
+++
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/PickListTest.java 2008-06-06
23:23:38 UTC (rev 8943)
@@ -4,8 +4,8 @@
import org.richfaces.RichSeleniumTest;
import org.richfaces.SeleniumTestBase;
import org.testng.Assert;
-import org.testng.annotations.AfterTest;
-import org.testng.annotations.BeforeTest;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;
@@ -18,16 +18,23 @@
/**
* This method are invoking before selenium tests started
*/
- @BeforeTest
- @Parameters( { "browser" })
- public void startSelenium(String browser) {
- super.startSelenium(browser);
+ @BeforeMethod
+ @Parameters({"browser", "filterPrefix"})
+ public void startSelenium(String browser, String filterPrefix) {
+ super.startSelenium(browser, filterPrefix);
}
+
+
+ @BeforeMethod
+ @Parameters({"loadStyleStrategy", "loadScriptStrategy"})
+ protected void loadConfiguration(String loadStyleStrategy, String loadScriptStrategy)
throws Exception {
+ super.loadConfiguration(loadStyleStrategy, loadScriptStrategy);
+ }
/**
* This method are invoking after selenium tests completed
*/
- @AfterTest
+ @AfterMethod(alwaysRun=true)
public void stopSelenium() {
super.stopSelenium();
}
@@ -97,7 +104,7 @@
}
public String getTestUrl() {
- return "/faces/pages/pickList/pickListTest.xhtml";
+ return "pages/pickList/pickListTest.xhtml";
}
}
Modified:
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/ProgressBarTest.java
===================================================================
---
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/ProgressBarTest.java 2008-06-06
23:16:49 UTC (rev 8942)
+++
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/ProgressBarTest.java 2008-06-06
23:23:38 UTC (rev 8943)
@@ -4,8 +4,8 @@
import org.richfaces.RichSeleniumTest;
import org.richfaces.SeleniumTestBase;
import org.testng.Assert;
-import org.testng.annotations.AfterTest;
-import org.testng.annotations.BeforeTest;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;
@@ -18,16 +18,23 @@
/**
* This method are invoking before selenium tests started
*/
- @BeforeTest
- @Parameters( { "browser" })
- public void startSelenium(String browser) {
- super.startSelenium(browser);
+ @BeforeMethod
+ @Parameters({"browser", "filterPrefix"})
+ public void startSelenium(String browser, String filterPrefix) {
+ super.startSelenium(browser, filterPrefix);
}
+
+
+ @BeforeMethod
+ @Parameters({"loadStyleStrategy", "loadScriptStrategy"})
+ protected void loadConfiguration(String loadStyleStrategy, String loadScriptStrategy)
throws Exception {
+ super.loadConfiguration(loadStyleStrategy, loadScriptStrategy);
+ }
/**
* This method are invoking after selenium tests completed
*/
- @AfterTest
+ @AfterMethod(alwaysRun=true)
public void stopSelenium() {
super.stopSelenium();
}
@@ -132,7 +139,7 @@
}
public String getTestUrl() {
- return "/faces/pages/progressBar/progressBarTest.xhtml";
+ return "pages/progressBar/progressBarTest.xhtml";
}
}
Modified:
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/SimpleTogglePanelTest.java
===================================================================
---
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/SimpleTogglePanelTest.java 2008-06-06
23:16:49 UTC (rev 8942)
+++
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/SimpleTogglePanelTest.java 2008-06-06
23:23:38 UTC (rev 8943)
@@ -25,8 +25,8 @@
import org.richfaces.RichSeleniumTest;
import org.richfaces.SeleniumTestBase;
import org.testng.Assert;
-import org.testng.annotations.AfterTest;
-import org.testng.annotations.BeforeTest;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;
@@ -39,16 +39,23 @@
/**
* This method are invoking before selenium tests started
*/
- @BeforeTest
- @Parameters( { "browser" })
- public void startSelenium(String browser) {
- super.startSelenium(browser);
+ @BeforeMethod
+ @Parameters({"browser", "filterPrefix"})
+ public void startSelenium(String browser, String filterPrefix) {
+ super.startSelenium(browser, filterPrefix);
}
+
+
+ @BeforeMethod
+ @Parameters({"loadStyleStrategy", "loadScriptStrategy"})
+ protected void loadConfiguration(String loadStyleStrategy, String loadScriptStrategy)
throws Exception {
+ super.loadConfiguration(loadStyleStrategy, loadScriptStrategy);
+ }
/**
* This method are invoking after selenium tests completed
*/
- @AfterTest
+ @AfterMethod(alwaysRun=true)
public void stopSelenium() {
super.stopSelenium();
}
@@ -109,7 +116,7 @@
}
public String getTestUrl() {
- return "/faces/pages/simpleTogglePanel/simpleTogglePanel.xhtml";
+ return "pages/simpleTogglePanel/simpleTogglePanel.xhtml";
}
}
Modified:
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/SpacerTest.java
===================================================================
---
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/SpacerTest.java 2008-06-06
23:16:49 UTC (rev 8942)
+++
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/SpacerTest.java 2008-06-06
23:23:38 UTC (rev 8943)
@@ -25,8 +25,8 @@
import org.richfaces.RichSeleniumTest;
import org.richfaces.SeleniumTestBase;
import org.testng.Assert;
-import org.testng.annotations.AfterTest;
-import org.testng.annotations.BeforeTest;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;
@@ -39,16 +39,23 @@
/**
* This method are invoking before selenium tests started
*/
- @BeforeTest
- @Parameters( { "browser" })
- public void startSelenium(String browser) {
- super.startSelenium(browser);
+ @BeforeMethod
+ @Parameters({"browser", "filterPrefix"})
+ public void startSelenium(String browser, String filterPrefix) {
+ super.startSelenium(browser, filterPrefix);
}
+
+
+ @BeforeMethod
+ @Parameters({"loadStyleStrategy", "loadScriptStrategy"})
+ protected void loadConfiguration(String loadStyleStrategy, String loadScriptStrategy)
throws Exception {
+ super.loadConfiguration(loadStyleStrategy, loadScriptStrategy);
+ }
/**
* This method are invoking after selenium tests completed
*/
- @AfterTest
+ @AfterMethod(alwaysRun=true)
public void stopSelenium() {
super.stopSelenium();
}
@@ -119,7 +126,7 @@
}
public String getTestUrl() {
- return "/faces/pages/spacer/spacerTest.xhtml";
+ return "pages/spacer/spacerTest.xhtml";
}
}
Modified:
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/TabPanelTest.java
===================================================================
---
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/TabPanelTest.java 2008-06-06
23:16:49 UTC (rev 8942)
+++
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/TabPanelTest.java 2008-06-06
23:23:38 UTC (rev 8943)
@@ -25,8 +25,8 @@
import org.richfaces.RichSeleniumTest;
import org.richfaces.SeleniumTestBase;
import org.testng.Assert;
-import org.testng.annotations.AfterTest;
-import org.testng.annotations.BeforeTest;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;
@@ -41,16 +41,23 @@
/**
* This method are invoking before selenium tests started
*/
- @BeforeTest
- @Parameters( { "browser" })
- public void startSelenium(String browser) {
- super.startSelenium(browser);
+ @BeforeMethod
+ @Parameters({"browser", "filterPrefix"})
+ public void startSelenium(String browser, String filterPrefix) {
+ super.startSelenium(browser, filterPrefix);
}
+
+
+ @BeforeMethod
+ @Parameters({"loadStyleStrategy", "loadScriptStrategy"})
+ protected void loadConfiguration(String loadStyleStrategy, String loadScriptStrategy)
throws Exception {
+ super.loadConfiguration(loadStyleStrategy, loadScriptStrategy);
+ }
/**
* This method are invoking after selenium tests completed
*/
- @AfterTest
+ @AfterMethod(alwaysRun=true)
public void stopSelenium() {
super.stopSelenium();
}
@@ -120,7 +127,7 @@
}
public String getTestUrl() {
- return "/faces/pages/tabPanel/tabPanelTest.xhtml";
+ return "pages/tabPanel/tabPanelTest.xhtml";
}
}
Modified:
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/TogglePanelTest.java
===================================================================
---
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/TogglePanelTest.java 2008-06-06
23:16:49 UTC (rev 8942)
+++
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/TogglePanelTest.java 2008-06-06
23:23:38 UTC (rev 8943)
@@ -25,8 +25,8 @@
import org.richfaces.RichSeleniumTest;
import org.richfaces.SeleniumTestBase;
import org.testng.Assert;
-import org.testng.annotations.AfterTest;
-import org.testng.annotations.BeforeTest;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Parameters;
import org.testng.annotations.Test;
@@ -41,16 +41,23 @@
/**
* This method are invoking before selenium tests started
*/
- @BeforeTest
- @Parameters( { "browser" })
- public void startSelenium(String browser) {
- super.startSelenium(browser);
+ @BeforeMethod
+ @Parameters({"browser", "filterPrefix"})
+ public void startSelenium(String browser, String filterPrefix) {
+ super.startSelenium(browser, filterPrefix);
}
+
+
+ @BeforeMethod
+ @Parameters({"loadStyleStrategy", "loadScriptStrategy"})
+ protected void loadConfiguration(String loadStyleStrategy, String loadScriptStrategy)
throws Exception {
+ super.loadConfiguration(loadStyleStrategy, loadScriptStrategy);
+ }
/**
* This method are invoking after selenium tests completed
*/
- @AfterTest
+ @AfterMethod(alwaysRun=true)
public void stopSelenium() {
super.stopSelenium();
}
@@ -187,7 +194,7 @@
}
public String getTestUrl() {
- return "/faces/pages/togglePanel/togglePanelTest.xhtml";
+ return "pages/togglePanel/togglePanelTest.xhtml";
}
}
Modified:
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 2008-06-06
23:16:49 UTC (rev 8942)
+++
trunk/test-applications/seleniumTest/src/test/testng/win/testng_default_default_neko.xml 2008-06-06
23:23:38 UTC (rev 8943)
@@ -1,5 +1,5 @@
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
-<suite name="seleniumTestDDNe">
+<suite name="seleniumTestDDNe" parallel="true"
thread-count="2">
<test name="IEFunctionalTests">
<parameter name="browser" value="*iexplore"/>
<parameter name="loadStyleStrategy" value="DEFAULT"/>