Author: lfryc(a)redhat.com
Date: 2009-12-09 13:15:30 -0500 (Wed, 09 Dec 2009)
New Revision: 16098
Modified:
branches/community/3.3.X/samples/richfaces-demo/functional-test/pom.xml
branches/community/3.3.X/samples/richfaces-demo/functional-test/profiles.jboss-qa.xml
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/AbstractSeleniumRichfacesTestCase.java
Log:
- added demo.location parameter to point on the specific binary
- added installation details for AS 6.0.0.M1 container into profiles.jboss-qa.xml
(RF-8190)
- added parameter selenium.debug to turn on selenium's debug and browserSideLog
options optionally
- added parameter selenium.maximize to to turn on maximizing and focusing tested windows
before the actual test begins (RF-8188)
- added
repository.exadel.com to profiles.jboss-qa.xml (RF-8189)
Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/pom.xml
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/pom.xml 2009-12-08
14:42:15 UTC (rev 16097)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/pom.xml 2009-12-09
18:15:30 UTC (rev 16098)
@@ -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,7 @@
<properties>
<demo.artifactId.suffix />
<demo.version>${project.version}</demo.version>
+ <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 +70,12 @@
<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>
</properties>
<build>
- <finalName>seleniumTest</finalName>
+ <finalName>${project.artifactId}</finalName>
<testResources>
<testResource>
<directory>src/test/resources</directory>
@@ -193,12 +196,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 +222,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>
@@ -303,6 +306,7 @@
<groupId>org.richfaces.samples</groupId>
<artifactId>richfaces-demo${demo.artifactId.suffix}</artifactId>
<type>war</type>
+ <location>${demo.location}</location>
<properties>
<context>${context.path}</context>
</properties>
@@ -314,7 +318,7 @@
</plugins>
</build>
</profile>
- <!-- Container-type specifics: JBoss AS 5.X -->
+ <!-- Container: JBoss AS 5.X -->
<profile>
<id>container-jboss5x</id>
<activation>
Modified:
branches/community/3.3.X/samples/richfaces-demo/functional-test/profiles.jboss-qa.xml
===================================================================
---
branches/community/3.3.X/samples/richfaces-demo/functional-test/profiles.jboss-qa.xml 2009-12-08
14:42:15 UTC (rev 16097)
+++
branches/community/3.3.X/samples/richfaces-demo/functional-test/profiles.jboss-qa.xml 2009-12-09
18:15:30 UTC (rev 16098)
@@ -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>
@@ -28,6 +33,17 @@
<demo.version>${profile.demo.version}</demo.version>
</properties>
</profile>
+ <profile>
+ <id>demo-found-in-workspace</id>
+ <activation>
+ <file>
+ <exists>richfaces-demo.war</exists>
+ </file>
+ </activation>
+ <properties>
+ <demo.location>./richfaces-demo.war</demo.location>
+ </properties>
+ </profile>
<!-- INTERNET EXPLORER PROFILE -->
<profile>
<id>browser-internet-explorer</id>
@@ -109,7 +125,27 @@
<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>
+ <properties>
+ <jboss5x.version>6.0.0.M1</jboss5x.version>
+ <jboss5x.installer.url.unix>file:/qa/home/lfryc/jboss-jsf2/jboss-5.1.0.GA.zip</jboss5x.installer.url.unix>
+ <jboss5x.installer.url.windows>file:h:\lfryc\jboss-jsf2\jboss-6.0.0.M1.zip</jboss5x.installer.url.windows>
+ </properties>
+ </profile>
+ <profile>
<id>container-tomcat6x-installation</id>
<activation>
<property>
@@ -118,9 +154,9 @@
</property>
</activation>
<properties>
- <container.version>6.0.18</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:t:\src\apache\apache-tomcat-6.0.18.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 +168,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:t:\src\jboss\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 +195,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/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/AbstractSeleniumRichfacesTestCase.java
===================================================================
---
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/AbstractSeleniumRichfacesTestCase.java 2009-12-08
14:42:15 UTC (rev 16097)
+++
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/AbstractSeleniumRichfacesTestCase.java 2009-12-09
18:15:30 UTC (rev 16098)
@@ -71,6 +71,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
@@ -99,7 +100,7 @@
loggingTestListener = new SeleniumLoggingTestListener();
runner.addTestListener(loggingTestListener);
}
-
+
/**
* Initializes context before each class run.
*
@@ -116,23 +117,32 @@
* 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 = new DefaultSelenium(seleniumHost, Integer.valueOf(seleniumPort), browser,
contextRoot);
selenium.start();
allowInitialXpath();
loadCustomLocationStrategies();
+
// adding selenium-side logging facility
loggingTestListener.setSelenium(selenium);
+
+ 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