continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From car...@apache.org
Subject svn commit: r793073 - in /continuum/trunk/continuum-webapp-test: pom.xml src/test/resources/testng.properties src/test/testng/org/apache/continuum/web/test/SetupSelenium.java src/test/testng/org/apache/continuum/web/test/parent/AbstractSeleniumTest.java
Date Fri, 10 Jul 2009 18:42:37 GMT
Author: carlos
Date: Fri Jul 10 18:42:36 2009
New Revision: 793073

URL: http://svn.apache.org/viewvc?rev=793073&view=rev
Log:
Enable passing selenium host and port from maven os system properties

Modified:
    continuum/trunk/continuum-webapp-test/pom.xml
    continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/SetupSelenium.java
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractSeleniumTest.java

Modified: continuum/trunk/continuum-webapp-test/pom.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/pom.xml?rev=793073&r1=793072&r2=793073&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/pom.xml (original)
+++ continuum/trunk/continuum-webapp-test/pom.xml Fri Jul 10 18:42:36 2009
@@ -87,6 +87,14 @@
                   <name>browser</name>
                   <value>${browser}</value>
                 </property>
+                <property>
+                  <name>seleniumHost</name>
+                  <value>${seleniumHost}</value>
+                </property>
+                <property>
+                  <name>seleniumPort</name>
+                  <value>${seleniumPort}</value>
+                </property>
               </systemProperties>
             </configuration>
           </execution>
@@ -288,7 +296,7 @@
       <id>start-selenium</id>
       <activation>
         <property>
-          <name>!seleniumhost</name>
+          <name>!seleniumHost</name>
         </property>
       </activation>
       <build>

Modified: continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties?rev=793073&r1=793072&r2=793073&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties (original)
+++ continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties Fri Jul 10
18:42:36 2009
@@ -12,9 +12,6 @@
 ADMIN_PASSWORD=admin123
 ADMIN_MAIL=admin@mail.com
 
-SELENIUM_HOST=localhost
-SELENIUM_PORT=4444
-
 DEFAULT_PROJ_GRP_NAME=Default Project Group
 DEFAULT_PROJ_GRP_ID=default
 DEFAULT_PROJ_GRP_DESCRIPTION=Contains all projects that do not have a group of their own

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/SetupSelenium.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/SetupSelenium.java?rev=793073&r1=793072&r2=793073&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/SetupSelenium.java
(original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/SetupSelenium.java
Fri Jul 10 18:42:36 2009
@@ -24,6 +24,7 @@
 import org.testng.annotations.AfterSuite;
 import org.testng.annotations.BeforeSuite;
 import org.testng.annotations.BeforeTest;
+import org.testng.annotations.Optional;
 import org.testng.annotations.Parameters;
 import org.testng.annotations.Test;
 
@@ -54,13 +55,14 @@
     }
 
     @BeforeTest
-    @Parameters( { "browser" } )
-    public void initializeContinuum( String browser )
+    @Parameters( { "browser", "seleniumHost", "seleniumPort" } )
+    public void initializeContinuum( String browser, @Optional( "localhost" ) String seleniumHost,
+                                     @Optional( "4444" ) int seleniumPort )
         throws Exception
     {
         System.out.println( this.getClass().getName() + " initializeContinuum" );
 
-        super.open( browser );
+        super.open( browser, seleniumHost, seleniumPort );
         Assert.assertNotNull( getSelenium(), "Selenium is not initialized" );
         getSelenium().open( baseUrl );
         String title = getSelenium().getTitle();

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractSeleniumTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractSeleniumTest.java?rev=793073&r1=793072&r2=793073&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractSeleniumTest.java
(original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractSeleniumTest.java
Fri Jul 10 18:42:36 2009
@@ -70,15 +70,12 @@
 
         baseUrl = getProperty( "BASE_URL" );
         maxWaitTimeInMs = getProperty( "MAX_WAIT_TIME_IN_MS" );
-
-        seleniumHost = getProperty( "SELENIUM_HOST" );
-        seleniumPort = Integer.parseInt( ( getProperty( "SELENIUM_PORT" ) ) );
     }
 
     /**
      * Initialize selenium
      */
-    public void open( String browser )
+    public void open( String browser, String seleniumHost, int seleniumPort )
         throws Exception
     {
         if ( getSelenium() == null )



Mime
View raw message