Author: lfryc(a)redhat.com
Date: 2010-01-14 10:27:05 -0500 (Thu, 14 Jan 2010)
New Revision: 16293
Modified:
branches/community/3.3.X/samples/richfaces-demo/functional-test/README.html
branches/community/3.3.X/samples/richfaces-demo/functional-test/pom.xml
Log:
- rf-demo ftest pom.xml - added possibility to start container / selenium-server
independently on tests, updated README (RFPL-325)
Modified: branches/community/3.3.X/samples/richfaces-demo/functional-test/README.html
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/README.html 2010-01-14
14:54:22 UTC (rev 16292)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/README.html 2010-01-14
15:27:05 UTC (rev 16293)
@@ -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> - but you
can turn the local Selenium session off by disabling it's profile:
<tt>-P!local-selenium-session</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> - 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/community/3.3.X/samples/richfaces-demo/functional-test/pom.xml
===================================================================
--- branches/community/3.3.X/samples/richfaces-demo/functional-test/pom.xml 2010-01-14
14:54:22 UTC (rev 16292)
+++ branches/community/3.3.X/samples/richfaces-demo/functional-test/pom.xml 2010-01-14
15:27:05 UTC (rev 16293)
@@ -234,6 +234,7 @@
<version>1.0</version>
<executions>
<execution>
+ <id>start-selenium-server</id>
<phase>pre-integration-test</phase>
<goals>
<goal>start-server</goal>
@@ -248,6 +249,17 @@
<debug>${selenium.debug}</debug>
</configuration>
</execution>
+ <execution>
+ <id>stop-selenium-server</id>
+ <phase>post-integration-test</phase>
+ <goals>
+ <goal>stop-server</goal>
+ </goals>
+ <configuration>
+ <background>true</background>
+ <port>${selenium.port}</port>
+ </configuration>
+ </execution>
</executions>
</plugin>
</plugins>
@@ -508,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>