Author: lfryc(a)redhat.com
Date: 2010-01-15 07:23:35 -0500 (Fri, 15 Jan 2010)
New Revision: 16305
Modified:
branches/sandbox/rf-demo-ftest-iexplore/README.html
branches/sandbox/rf-demo-ftest-iexplore/pom.xml
branches/sandbox/rf-demo-ftest-iexplore/src/test/java/org/jboss/richfaces/integrationTest/dataFilterSlider/DataFilterSliderTestCase.java
branches/sandbox/rf-demo-ftest-iexplore/src/test/resources/org/jboss/richfaces/integrationTest/dataFilterSlider/locators.properties
Log:
- merge of changes in branch community/3.3.X to locally - r16290 through r16304
Modified: branches/sandbox/rf-demo-ftest-iexplore/README.html
===================================================================
--- branches/sandbox/rf-demo-ftest-iexplore/README.html 2010-01-15 12:17:27 UTC (rev
16304)
+++ branches/sandbox/rf-demo-ftest-iexplore/README.html 2010-01-15 12:23:35 UTC (rev
16305)
@@ -85,7 +85,7 @@
<h4>Changing host and port of SeleniumServer</h4>
<p>By default build uses local selenium (<tt>localhost:8444</tt>)
started in <tt>pre-integration-test</tt> phase, but you can define other host
and/or port too:</p>
<p class="indent"><tt>$ mvn ...
<b>-Dselenium.host=remote.host -Dselenium.port=4444</b></tt></p>
- <p>(note: despite of specifying other host for connecting remote SeleniumServer,
the local instance of SeleniumServer is triggered automatically on the specified port
<tt>${selenium.port}</tt> listening on <tt>0.0.0.0</tt> - so give
a attention what port are you using)</p>
+ <p>(note: despite of specifying other host for connecting remote SeleniumServer,
the local instance of SeleniumServer is triggered automatically on the specified port
<tt>${selenium.port}</tt> listening on <tt>0.0.0.0</tt> - but you
can turn the local Selenium session off by disabling it's profile: <tt>-P
'!local-selenium-session'</tt>)</p>
<p>(note: build automatically prepares JavaScript extensions for SeleniumServer,
so it is necessary to copy that extensions from
<tt>target/test-classes/custom-extensions.js</tt> and start designated
SeleniumServer with switch <tt>-userExtension</tt> pointed to that file - the
<tt>custom-extensions.js</tt> are built in
<tt>process-test-resources</tt> phase)</p>
<h3>Which richfaces-demo artifact use?</h3>
@@ -129,5 +129,20 @@
<h2>Configuration by default</h2>
<p>All of the definitions above are configured with respect of configuration by
default paragidm, so it is possible to achieve different behaviours with varying
combinations.</p>
<p>All default values are specified in pom.xml in properties.</p>
+
+ <h2>Special configurations</h2>
+
+ <h3>Debugging</h3>
+ <p>If you want to use the selenium server or container without running the test
suite (e.g. for debugging purposes), you may find the following examples
useful:</p>
+
+ <h4>Run container only</h4>
+ <p class="indent"><tt>$ mvn verify <b>-DcontainerId=tomcat6x
-Dmaven.test.skip=true -P press-key-to-shutdown-server</b></tt></p>
+
+ <h4>Run Selenium server only</h4>
+ <p class="indent"<tt>$ mvn verify <b>-P
'press-key-to-shutdown-server,local-selenim-session,!integration-test,!container-demoapp-deployable-dependency'</b></tt></p>
+
+ <h4>Run integration test suite only</h4>
+ <p>If you have already running selenium server and container, you can just run a
test suite:</p>
+ <p class="indent"<tt>$ mvn verify -Dbrowser="*firefox"
<b>-P
'!local-selenium-session,!container-demoapp-deployable-dependency'</b></tt></p>
</body>
</html>
\ No newline at end of file
Modified: branches/sandbox/rf-demo-ftest-iexplore/pom.xml
===================================================================
--- branches/sandbox/rf-demo-ftest-iexplore/pom.xml 2010-01-15 12:17:27 UTC (rev 16304)
+++ branches/sandbox/rf-demo-ftest-iexplore/pom.xml 2010-01-15 12:23:35 UTC (rev 16305)
@@ -147,6 +147,46 @@
<build>
<plugins>
<plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.4.3</version>
+ <executions>
+ <execution>
+ <id>surefire-it</id>
+ <phase>integration-test</phase>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ <configuration>
+ <skip>false</skip>
+ <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}'
-Dselenium.debug='${selenium.debug}'
-Dselenium.maximize='${selenium.maximize}'
-Dmaven.resources.dir='${resources.dir}'
-Dmaven.project.build.directory='${project.build.directory}'
-Djsf.majorVersion='${jsf.majorVersion}'</argLine>
+ <firefoxProfileTemplate>${firefoxProfileTemplate}</firefoxProfileTemplate>
+ <properties>
+ <property>
+ <name>listener</name>
+ <value>org.jboss.richfaces.integrationTest.ConsoleStatusTestListener</value>
+ </property>
+ </properties>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
+ <id>local-selenium-session</id>
+ <activation>
+ <property>
+ <name>!maven.test.skip</name>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
@@ -194,6 +234,7 @@
<version>1.0</version>
<executions>
<execution>
+ <id>start-selenium-server</id>
<phase>pre-integration-test</phase>
<goals>
<goal>start-server</goal>
@@ -208,32 +249,15 @@
<debug>${selenium.debug}</debug>
</configuration>
</execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>2.4.3</version>
- <executions>
<execution>
- <id>surefire-it</id>
- <phase>integration-test</phase>
+ <id>stop-selenium-server</id>
+ <phase>post-integration-test</phase>
<goals>
- <goal>test</goal>
+ <goal>stop-server</goal>
</goals>
<configuration>
- <skip>false</skip>
- <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}'
-Dselenium.debug='${selenium.debug}'
-Dselenium.maximize='${selenium.maximize}'
-Dmaven.resources.dir='${resources.dir}'
-Dmaven.project.build.directory='${project.build.directory}'
-Djsf.majorVersion='${jsf.majorVersion}'</argLine>
- <firefoxProfileTemplate>${firefoxProfileTemplate}</firefoxProfileTemplate>
- <properties>
- <property>
- <name>listener</name>
- <value>org.jboss.richfaces.integrationTest.ConsoleStatusTestListener</value>
- </property>
- </properties>
+ <background>true</background>
+ <port>${selenium.port}</port>
</configuration>
</execution>
</executions>
@@ -496,6 +520,30 @@
<
container.installer.url>http://www.apache.org/dist/tomcat/tomcat-6/v${...
</properties>
</profile>
+ <profile>
+ <id>press-key-to-shutdown-server</id>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>press-key-to-shutdown-server</id>
+ <phase>integration-test</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <input>Press key for shutdown server...</input>
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
</profiles>
<dependencies>
<dependency>
Modified:
branches/sandbox/rf-demo-ftest-iexplore/src/test/java/org/jboss/richfaces/integrationTest/dataFilterSlider/DataFilterSliderTestCase.java
===================================================================
---
branches/sandbox/rf-demo-ftest-iexplore/src/test/java/org/jboss/richfaces/integrationTest/dataFilterSlider/DataFilterSliderTestCase.java 2010-01-15
12:17:27 UTC (rev 16304)
+++
branches/sandbox/rf-demo-ftest-iexplore/src/test/java/org/jboss/richfaces/integrationTest/dataFilterSlider/DataFilterSliderTestCase.java 2010-01-15
12:23:35 UTC (rev 16305)
@@ -65,7 +65,7 @@
/**
* Use slider to change input price and checks that all prices in table is
- * lowe than price selected by slider and given in text-input next to the
+ * lower than price selected by slider and given in text-input next to the
* slider
*/
@Test
@@ -78,7 +78,7 @@
* step is contained all values defined in all steps with lesser selected
* value of price
*/
- @Test
+ @Test(dependsOnMethods = "testSimpleSlider")
public void testComplexSlider() {
List<Integer> lowMileages = testSlider(format(MSG_CHOICES_OF_SLIDER_PERCENTAGES,
0));
List<Integer> highMileages = testSlider(format(MSG_CHOICES_OF_SLIDER_PERCENTAGES,
1));
@@ -104,7 +104,7 @@
* checks that only given brand is in table. Then repeat this process once
* with another input data.
*/
- @Test
+ @Test(dependsOnMethods = { "testSimpleSlider", "testSimpleBrand" })
public void testMethodInterleaving() {
testSlider(format(MSG_CHOICES_OF_SLIDER_PERCENTAGES_FOR_INTERLEAVING, 0));
testBrand(format(MSG_CHOICES_OF_BRANDS, 0));
Modified:
branches/sandbox/rf-demo-ftest-iexplore/src/test/resources/org/jboss/richfaces/integrationTest/dataFilterSlider/locators.properties
===================================================================
---
branches/sandbox/rf-demo-ftest-iexplore/src/test/resources/org/jboss/richfaces/integrationTest/dataFilterSlider/locators.properties 2010-01-15
12:17:27 UTC (rev 16304)
+++
branches/sandbox/rf-demo-ftest-iexplore/src/test/resources/org/jboss/richfaces/integrationTest/dataFilterSlider/locators.properties 2010-01-15
12:23:35 UTC (rev 16305)
@@ -1,7 +1,7 @@
FIELDSET_HEADER=jquery=fieldset > legend
-TABLE_ROWS=jquery=tr[class*=rich-table-row]
-TD_MILEAGE_PREFORMATTED=jquery\=tr.rich-table-row{0,choice,0\#|1\#\:nth-child({0})} >
td\:eq(3)
-TD_BRAND_PREFORMATTED=jquery\=tr.rich-table-row{0,choice,0\#|1\#\:nth-child({0})} >
td\:eq(0)
+TABLE_ROWS=jquery\=table[id$\=carList] tr.rich-table-row
+TD_MILEAGE_PREFORMATTED=jquery\=table[id$\=carList]
tr.rich-table-row{0,choice,0\#|1\#\:nth-child({0})} > td\:nth-child(4)
+TD_BRAND_PREFORMATTED=jquery\=table[id$\=carList]
tr.rich-table-row{0,choice,0\#|1\#\:nth-child({0})} > td\:nth-child(1)
LINK_BRAND_PREFORMATTED=jquery=td.column-index > a:textEquals({0})
INPUT_MAX_PRICE=jquery=input.rich-dataFilterSlider-input-field
DIV_SLIDER_HANDLE=jquery=div.rich-dataFilterSlider-handle