Author: lfryc(a)redhat.com
Date: 2009-12-17 02:17:20 -0500 (Thu, 17 Dec 2009)
New Revision: 16160
Modified:
branches/sandbox/rf-demo-ftest-iexplore/pom.xml
branches/sandbox/rf-demo-ftest-iexplore/profiles.jboss-qa.xml
branches/sandbox/rf-demo-ftest-iexplore/src/test/java/org/jboss/richfaces/integrationTest/AbstractSeleniumRichfacesTestCase.java
branches/sandbox/rf-demo-ftest-iexplore/src/test/java/org/jboss/richfaces/integrationTest/orderingList/OrderingListTestCase.java
Log:
- merge of changes in branch community/3.3.X to locally - r16027 through r16159
Modified: branches/sandbox/rf-demo-ftest-iexplore/pom.xml
===================================================================
--- branches/sandbox/rf-demo-ftest-iexplore/pom.xml 2009-12-17 03:06:55 UTC (rev 16159)
+++ branches/sandbox/rf-demo-ftest-iexplore/pom.xml 2009-12-17 07:17:20 UTC (rev 16160)
@@ -7,7 +7,7 @@
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.richfaces.integrationTest</groupId>
- <artifactId>selenium-test</artifactId>
+ <artifactId>functional-test</artifactId>
<packaging>jar</packaging>
<name>selenium-test</name>
<url>http://maven.apache.org</url>
@@ -33,7 +33,7 @@
</snapshots>
</repository>
<repository>
- <id>openqa</id>
+ <id>archiva.openqa.org</id>
<name>OpenQA Repository</name>
<
url>http://archiva.openqa.org/repository/releases</url>
<layout>default</layout>
@@ -61,6 +61,8 @@
<properties>
<demo.artifactId.suffix />
<demo.version>${project.version}</demo.version>
+ <demo.classifier></demo.classifier>
+ <demo.location></demo.location>
<resources.dir>${project.build.directory}/test-classes</resources.dir>
<extensions.dir>${resources.dir}/user-extensions</extensions.dir>
<browser></browser>
@@ -69,10 +71,15 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<selenium.host>localhost</selenium.host>
<selenium.port>8444</selenium.port>
+ <selenium.debug>false</selenium.debug>
+ <selenium.maximize>false</selenium.maximize>
<firefoxProfileTemplate></firefoxProfileTemplate>
+ <demo.deployable>${demo.deployable.directory}/${demo.deployable.file}</demo.deployable>
+ <demo.deployable.directory>${project.build.directory}</demo.deployable.directory>
+ <demo.deployable.file>richfaces-demo.war</demo.deployable.file>
</properties>
<build>
- <finalName>seleniumTest</finalName>
+ <finalName>${project.artifactId}</finalName>
<testResources>
<testResource>
<directory>src/test/resources</directory>
@@ -193,12 +200,12 @@
</goals>
<configuration>
<background>true</background>
- <debug>false</debug>
<port>${selenium.port}</port>
<userExtensions>${resources.dir}/custom-extensions.js</userExtensions>
<logOutput>true</logOutput>
- <browserSideLog>true</browserSideLog>
- <debug>true</debug>
+ <logFile>${project.build.directory}/selenium/selenium-server.log</logFile>
+ <browserSideLog>${selenium.debug}</browserSideLog>
+ <debug>${selenium.debug}</debug>
</configuration>
</execution>
</executions>
@@ -219,7 +226,7 @@
<suiteXmlFiles>
<suiteXmlFile>src/test/resources/testng.xml</suiteXmlFile>
</suiteXmlFiles>
- <argLine>-Dbrowser='${browser}'
-Dcontext.root='${context.root}' -Dcontext.path='${context.path}'
-Dselenium.host='${selenium.host}' -Dselenium.port='${selenium.port}'
-Dmaven.resources.dir='${resources.dir}'
-Dmaven.project.build.directory='${project.build.directory}'</argLine>
+ <argLine>-Dbrowser='${browser}'
-Dcontext.root='${context.root}' -Dcontext.path='${context.path}'
-Dselenium.host='${selenium.host}' -Dselenium.port='${selenium.port}'
-Dselenium.debug='${selenium.debug}'
-Dselenium.maximize='${selenium.maximize}'
-Dmaven.resources.dir='${resources.dir}'
-Dmaven.project.build.directory='${project.build.directory}'</argLine>
<firefoxProfileTemplate>${firefoxProfileTemplate}</firefoxProfileTemplate>
<properties>
<property>
@@ -236,6 +243,11 @@
</profile>
<profile>
<id>jsf2_0</id>
+ <activation>
+ <property>
+ <name>jsf2</name>
+ </property>
+ </activation>
<properties>
<demo.artifactId.suffix>-jsf2</demo.artifactId.suffix>
</properties>
@@ -248,15 +260,6 @@
<name>containerId</name>
</property>
</activation>
- <dependencies>
- <dependency>
- <groupId>org.richfaces.samples</groupId>
- <artifactId>richfaces-demo${demo.artifactId.suffix}</artifactId>
- <version>${demo.version}</version>
- <type>war</type>
- <scope>provided</scope>
- </dependency>
- </dependencies>
<build>
<plugins>
<plugin>
@@ -300,9 +303,8 @@
<type>installed</type>
<deployables>
<deployable>
- <groupId>org.richfaces.samples</groupId>
- <artifactId>richfaces-demo${demo.artifactId.suffix}</artifactId>
<type>war</type>
+ <location>${demo.deployable}</location>
<properties>
<context>${context.path}</context>
</properties>
@@ -314,8 +316,92 @@
</plugins>
</build>
</profile>
- <!-- Container-type specifics: JBoss AS 5.X -->
<profile>
+ <id>container-demoapp-deployable-dependency</id>
+ <activation>
+ <file>
+ <missing>${demo.location}</missing>
+ </file>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy-richfaces-demo-war-dependency</id>
+ <phase>package</phase>
+ <goals>
+ <goal>copy</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.richfaces.samples</groupId>
+ <artifactId>richfaces-demo${demo.artifactId.suffix}</artifactId>
+ <version>${demo.version}</version>
+ <classifier>${demo.classifier}</classifier>
+ <type>war</type>
+ <overWrite>true</overWrite>
+ <outputDirectory>${demo.deployable.directory}</outputDirectory>
+ <destFileName>${demo.deployable.file}</destFileName>
+ </artifactItem>
+ </artifactItems>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>delete-richfaces-demo-war</id>
+ <phase>post-integration-test</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <delete file="${demo.location}"
tofile="${demo.deployable}" verbose="true" />
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
+ <id>container-demoapp-deployable-location</id>
+ <activation>
+ <file>
+ <exists>${demo.location}</exists>
+ </file>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy-richfaces-demo-war-from-location</id>
+ <phase>package</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <copy file="${demo.location}"
tofile="${project.build.directory}/richfaces-demo.war" verbose="true"
/>
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <!-- Container: JBoss AS 5.X -->
+ <profile>
<id>container-jboss5x</id>
<activation>
<property>
Modified: branches/sandbox/rf-demo-ftest-iexplore/profiles.jboss-qa.xml
===================================================================
--- branches/sandbox/rf-demo-ftest-iexplore/profiles.jboss-qa.xml 2009-12-17 03:06:55 UTC
(rev 16159)
+++ branches/sandbox/rf-demo-ftest-iexplore/profiles.jboss-qa.xml 2009-12-17 07:17:20 UTC
(rev 16160)
@@ -2,6 +2,11 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
+
+ <activeProfiles>
+ <activeProfile>container-installation</activeProfile>
+ </activeProfiles>
+
<profiles>
<!-- This is used by JBoss RichFaces QA -->
<profile>
@@ -109,7 +114,32 @@
<browser.firefox>*firefox
${firefoxes.home}\firefox-${browser.version}\firefox.exe</browser.firefox>
</properties>
</profile>
+ <!-- CONTAINER INSTALLATION -->
<profile>
+ <id>container-installation</id>
+ <properties>
+ <jboss5x.version>5.1.0.GA</jboss5x.version>
+ <jboss5x.installer.url.unix>file:/qa/tools/src/jboss/jboss-5.1.0.GA.zip</jboss5x.installer.url.unix>
+ <jboss5x.installer.url.windows>file:t:\src\jboss\jboss-5.1.0.GA.zip</jboss5x.installer.url.windows>
+ <tomcat6x.version>6.0.18</tomcat6x.version>
+ <tomcat6x.installer.url.unix>file:/qa/tools/src/apache/apache-tomcat-6.0.18.zip</tomcat6x.installer.url.unix>
+ <tomcat6x.installer.url.windows>file:t:\src\apache\apache-tomcat-6.0.18.zip</tomcat6x.installer.url.windows>
+ </properties>
+ </profile>
+ <profile>
+ <id>container-installation-jsf2</id>
+ <activation>
+ <property>
+ <name>jsf2</name>
+ </property>
+ </activation>
+ <properties>
+ <jboss5x.version>5.1.0.GA</jboss5x.version>
+ <jboss5x.installer.url.unix>file:/qa/home/hudson/lfryc/jboss-jsf2/jboss-5.1.0.GA.zip</jboss5x.installer.url.unix>
+ <jboss5x.installer.url.windows>file:h:\hudson\lfryc\jboss-jsf2\jboss-5.1.0.GA.zip</jboss5x.installer.url.windows>
+ </properties>
+ </profile>
+ <profile>
<id>container-tomcat6x-installation</id>
<activation>
<property>
@@ -118,9 +148,9 @@
</property>
</activation>
<properties>
- <container.version>6.0.20</container.version>
- <container.installer.url.unix>file:/qa/tools/src/apache/apache-tomcat-6.0.18.zip</container.installer.url.unix>
- <container.installer.url.windows>file:C:\Documents and Settings\user\My
Documents\distributions\apache-tomcat-6.0.20.zip</container.installer.url.windows>
+ <container.version>${tomcat6x.version}</container.version>
+ <container.installer.url.unix>${tomcat6x.installer.url.unix}</container.installer.url.unix>
+ <container.installer.url.windows>${tomcat6x.installer.url.windows}</container.installer.url.windows>
</properties>
</profile>
<profile>
@@ -132,9 +162,9 @@
</property>
</activation>
<properties>
- <container.version>5.1.0.GA</container.version>
- <container.installer.url.unix>file:/qa/tools/src/jboss/jboss-5.1.0.GA.zip</container.installer.url.unix>
- <container.installer.url.windows>file:C:\Documents and Settings\user\My
Documents\distributions\jboss-5.1.0.GA.zip</container.installer.url.windows>
+ <container.version>${jboss5x.version}</container.version>
+ <container.installer.url.unix>${jboss5x.installer.url.unix}</container.installer.url.unix>
+ <container.installer.url.windows>${jboss5x.installer.url.windows}</container.installer.url.windows>
</properties>
</profile>
<profile>
@@ -159,5 +189,22 @@
<container.installer.url>${container.installer.url.windows}</container.installer.url>
</properties>
</profile>
+ <!-- REPOSITORIES CONFIGURATION -->
+ <profile>
+ <id>repository-exadel</id>
+ <repositories>
+ <repository>
+ <!-- used for RichFaces release testing -->
+ <id>repository.exadel.com</id>
+ <url>http://repository.exadel.com</url>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+ </profile>
</profiles>
</profilesXml>
Modified:
branches/sandbox/rf-demo-ftest-iexplore/src/test/java/org/jboss/richfaces/integrationTest/AbstractSeleniumRichfacesTestCase.java
===================================================================
---
branches/sandbox/rf-demo-ftest-iexplore/src/test/java/org/jboss/richfaces/integrationTest/AbstractSeleniumRichfacesTestCase.java 2009-12-17
03:06:55 UTC (rev 16159)
+++
branches/sandbox/rf-demo-ftest-iexplore/src/test/java/org/jboss/richfaces/integrationTest/AbstractSeleniumRichfacesTestCase.java 2009-12-17
07:17:20 UTC (rev 16160)
@@ -69,6 +69,7 @@
*/
protected String mavenProjectBuildDirectory; // usually ${project}/target
protected String mavenResourcesDir; // usually ${project}/target/test-classes
+ protected boolean seleniumDebug; // if used specified debug mode of selenium
testing
/**
* predefined waitings to use in inheritors
@@ -92,7 +93,7 @@
TestRunner runner = (TestRunner) context;
runner.addTestListener(loggingTestListener);
}
-
+
/**
* Initializes context before each class run.
*
@@ -109,14 +110,16 @@
* specifies on which port should selenium server run
*/
@BeforeClass
- @Parameters( { "context.root", "context.path", "browser",
"selenium.host", "selenium.port", "maven.resources.dir",
- "maven.project.build.directory" })
+ @Parameters( { "context.root", "context.path", "browser",
"selenium.host", "selenium.port", "selenium.debug",
+ "selenium.maximize", "maven.resources.dir",
"maven.project.build.directory" })
public void initializeContext(String contextRoot, String contextPath, String browser,
String seleniumHost,
- String seleniumPort, String mavenResourcesDir, String mavenProjectBuildDirectory) {
+ String seleniumPort, String seleniumDebug, String seleniumMaximize, String
mavenResourcesDir,
+ String mavenProjectBuildDirectory) {
this.contextRoot = contextRoot;
this.contextPath = contextPath;
this.mavenResourcesDir = mavenResourcesDir;
this.mavenProjectBuildDirectory = mavenProjectBuildDirectory;
+ this.seleniumDebug = Boolean.valueOf(seleniumDebug);
selenium = RichfacesSelenium.getInstance(seleniumHost, Integer.valueOf(seleniumPort),
browser,
@@ -124,12 +127,18 @@
selenium.start();
allowInitialXpath();
loadCustomLocationStrategies();
+
+
+ // adding selenium-side logging facility
loggingTestListener.setSelenium(selenium);
- selenium.windowFocus();
- selenium.windowMaximize();
+ if (Boolean.valueOf(seleniumMaximize)) {
+ // focus and maximaze tested window
+ selenium.windowFocus();
+ selenium.windowMaximize();
+ }
}
-
+
/**
* Uses selenium.addLocationStrategy to implement own strategies to locate
* items in the tested page
Modified:
branches/sandbox/rf-demo-ftest-iexplore/src/test/java/org/jboss/richfaces/integrationTest/orderingList/OrderingListTestCase.java
===================================================================
---
branches/sandbox/rf-demo-ftest-iexplore/src/test/java/org/jboss/richfaces/integrationTest/orderingList/OrderingListTestCase.java 2009-12-17
03:06:55 UTC (rev 16159)
+++
branches/sandbox/rf-demo-ftest-iexplore/src/test/java/org/jboss/richfaces/integrationTest/orderingList/OrderingListTestCase.java 2009-12-17
07:17:20 UTC (rev 16160)
@@ -157,6 +157,8 @@
// click the 'Up' button
selenium.click(LOC_BUTTON_UP);
+ waitFor(1000);
+
after[0] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 4));
after[1] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 5));
@@ -185,6 +187,8 @@
// click the 'Up' button (5,6,7 -> 6,7,5)
selenium.click(LOC_BUTTON_UP);
+ waitFor(1000);
+
after[0] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 4));
after[1] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 5));
after[2] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 6));
@@ -215,6 +219,8 @@
// click the 'Up' button (5,6,7 -> 6,7,5)
selenium.click(LOC_BUTTON_UP);
+ waitFor(1000);
+
after[0] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 4));
after[1] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 5));
after[2] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 6));
@@ -240,6 +246,8 @@
// click the 'Down' button
selenium.click(LOC_BUTTON_DOWN);
+ waitFor(1000);
+
after[0] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 5));
after[1] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 6));
@@ -268,6 +276,8 @@
// click the 'Down' button (5,6,7 -> 7,5,6)
selenium.click(LOC_BUTTON_DOWN);
+ waitFor(1000);
+
after[0] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 4));
after[1] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 5));
after[2] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 6));
@@ -298,6 +308,8 @@
// click the 'Down' button (5,6,7 -> 7,5,6)
selenium.click(LOC_BUTTON_DOWN);
+ waitFor(1000);
+
after[0] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 4));
after[1] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 5));
after[2] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 6));
@@ -325,6 +337,8 @@
// click the 'Last' button (1,2,..,last-1,last --> 2,..,last,1)
selenium.click(LOC_BUTTON_LAST);
+ waitFor(1000);
+
after[0] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 0));
after[1] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED,
countOfLines-2));
after[2] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED,
countOfLines-1));
@@ -339,7 +353,7 @@
*/
@Test
public void testLastMultipleSongsShift() {
- String[] before = new String[4];
+ String[] before = new String[4];
String[] after = new String[4];
int countOfLines = getJQueryCount(LOC_TABLE_LINES);
@@ -357,6 +371,8 @@
// click the 'Last' button (1,2,3,..,last --> 3,..,last,1,2)
selenium.click(LOC_BUTTON_LAST);
+ waitFor(1000);
+
after[0] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 0));
after[1] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED,
countOfLines-3));
after[2] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED,
countOfLines-2));
@@ -391,6 +407,8 @@
// click the 'Last' button (1,2,3,..,last --> 3,..,last,1,2)
selenium.click(LOC_BUTTON_LAST);
+ waitFor(1000);
+
after[0] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 0));
after[1] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED,
countOfLines-3));
after[2] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED,
countOfLines-2));
@@ -420,6 +438,8 @@
// click the 'First' button (1...last-1,last --> last,1...last-1)
selenium.click(LOC_BUTTON_FIRST);
+ waitFor(1000);
+
after[0] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 0));
after[1] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 1));
after[2] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED,
countOfLines-1));
@@ -453,6 +473,8 @@
// last-1,last,1...last-2)
selenium.click(LOC_BUTTON_FIRST);
+ waitFor(1000);
+
after[0] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 0));
after[1] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 1));
after[2] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 2));
@@ -488,6 +510,8 @@
// last-1,last,1...last-2)
selenium.click(LOC_BUTTON_FIRST);
+ waitFor(1000);
+
after[0] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 0));
after[1] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 1));
after[2] = selenium.getText(format(LOC_TABLE_LINE_PREFORMATTED, 2));