You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@continuum.apache.org by ev...@apache.org on 2006/10/27 09:54:34 UTC
svn commit: r468307 - in /maven/continuum/trunk/continuum-webapp-test:
Readme.txt pom.xml
src/test/it/org/apache/continuum/web/test/AbstractSeleniumTestCase.java
Author: evenisse
Date: Fri Oct 27 00:54:33 2006
New Revision: 468307
URL: http://svn.apache.org/viewvc?view=rev&rev=468307
Log:
Add the possibility to run tests with Internet Explorer
Added:
maven/continuum/trunk/continuum-webapp-test/Readme.txt (with props)
Modified:
maven/continuum/trunk/continuum-webapp-test/pom.xml
maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AbstractSeleniumTestCase.java
Added: maven/continuum/trunk/continuum-webapp-test/Readme.txt
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp-test/Readme.txt?view=auto&rev=468307
==============================================================================
--- maven/continuum/trunk/continuum-webapp-test/Readme.txt (added)
+++ maven/continuum/trunk/continuum-webapp-test/Readme.txt Fri Oct 27 00:54:33 2006
@@ -0,0 +1,11 @@
+Test Continuum with Tomcat 5.x and firefox
+ 'mvn clean install' or 'mvn clean install -Ptomcat5x,firefox'
+
+Test Continuum with Tomcat 5.x and Internet Explorer
+ 'mvn clean install -Ptomcat5x,iexplore'
+
+Test Continuum with Tomcat 5.x and a specific browser
+ 'mvn clean install -Ptomcat5x,otherbrowser -DbrowserPath=PATH_TO_YOUR_BROWSER
+
+Warning: If you specify your own custom browser, it's up to you to configure it correctly. At a minimum, you'll need to configure your browser to use the Selenium Server as a proxy, and disable all browser-specific prompting.
+http://release.openqa.org/selenium-remote-control/nightly/doc/java/com/thoughtworks/selenium/DefaultSelenium.html#DefaultSelenium(java.lang.String,%20int,%20java.lang.String,%20java.lang.String)
\ No newline at end of file
Propchange: maven/continuum/trunk/continuum-webapp-test/Readme.txt
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/continuum/trunk/continuum-webapp-test/Readme.txt
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Modified: maven/continuum/trunk/continuum-webapp-test/pom.xml
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp-test/pom.xml?view=diff&rev=468307&r1=468306&r2=468307
==============================================================================
--- maven/continuum/trunk/continuum-webapp-test/pom.xml (original)
+++ maven/continuum/trunk/continuum-webapp-test/pom.xml Fri Oct 27 00:54:33 2006
@@ -194,6 +194,14 @@
</goals>
</execution>
</executions>
+ <configuration>
+ <systemProperties>
+ <property>
+ <name>browser</name>
+ <value>${browser}</value>
+ </property>
+ </systemProperties>
+ </configuration>
</plugin>
</plugins>
</build>
@@ -207,6 +215,28 @@
<properties>
<container.name>tomcat5x</container.name>
<container.url>http://apache.multidist.com/tomcat/tomcat-5/v5.5.20/bin/apache-tomcat-5.5.20.zip</container.url>
+ </properties>
+ </profile>
+
+ <profile>
+ <id>firefox</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <properties>
+ <browser>*firefox</browser>
+ </properties>
+ </profile>
+ <profile>
+ <id>iexplore</id>
+ <properties>
+ <browser>*iexplore</browser>
+ </properties>
+ </profile>
+ <profile>
+ <id>otherbrowser</id>
+ <properties>
+ <browser>${browserPath}</browser>
</properties>
</profile>
</profiles>
Modified: maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AbstractSeleniumTestCase.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AbstractSeleniumTestCase.java?view=diff&rev=468307&r1=468306&r2=468307
==============================================================================
--- maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AbstractSeleniumTestCase.java (original)
+++ maven/continuum/trunk/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AbstractSeleniumTestCase.java Fri Oct 27 00:54:33 2006
@@ -19,6 +19,7 @@
import com.thoughtworks.selenium.DefaultSelenium;
import com.thoughtworks.selenium.Selenium;
import junit.framework.TestCase;
+import org.codehaus.plexus.util.StringUtils;
import org.openqa.selenium.server.SeleniumServer;
import java.util.Calendar;
@@ -44,7 +45,13 @@
public void setUp()
{
- sel = new DefaultSelenium( "localhost", SeleniumServer.DEFAULT_PORT, "*firefox", baseUrl );
+ String browser = System.getProperty( "browser" );
+ if ( StringUtils.isEmpty( browser ) )
+ {
+ browser = "*firefox";
+ }
+
+ sel = new DefaultSelenium( "localhost", SeleniumServer.DEFAULT_PORT, browser, baseUrl );
sel.start();
initialize();
}